I was curious if anybody has noticed a significant performance decrease going from 1.4.0 to 1.5.0. My app has gone from loading the home page in about 5 seconds to taking about 30 seconds. I don’t know what the exact cause is yet, but I know that it happens when I move from 1.4.0 to 1.5.0. Unfortunately, I don’t have more information right now. The code is all proprietary, so I’d have to do some significant work to get a JSBin set up showing the issue.
If anybody has experienced anything similar, I’d like to hear about it and possibly pinpoint my issue.
I’ve updated my post with screenshots of the profiles for each version. The only thing that changed between each was the version of Ember.js. And for 1.5.0, it seems to be spending a huge amount of time dealing with getters, dependencies and observers. What changed in Ember.1.50 that could have prompted this slowdown?
hopefully not, but this could be related to my performance tuning. We did thoroughly test across several big apps, with only positive throughput improvements.
Unfortunately I am likely unable (do to some personal stuff) take a closer look until sunday (maybe monday). If it is possible to provide me with access to the app (maybe via screen sharing session). I would love to dig in and see what is going on.
I hadn’t thought of using Git bisect. I’ll try that out on Monday to try to narrow things down a bit.
@stefan I can probably share the code with you and maybe setup a Heroku demo server or something. I’m out of town this weekend, so don’t worry about not getting to it immediately. I’ll see what other information I can dig up and I’ll contact you early next week.
Sorry guys, it’s been a busy week here and I nearly forgot about this since I temporarily switched back to 1.4.0. I don’t have much time here at work today, but I will have time later tonight. When I get home, I’ll gather the information I can then we’ll work through this. I have some suspicions of what might be causing it, but I want to double-check first.
So I ran a really quick test just to see if I was crazy, and it turns out I’m not, I’m just really bad at using Ember observers. In some of our proprietary persistence code, I was performing a large chunk of property updates, but I wasn’t wrapping them in beingPropertyChanges and endPropertyChanges. As soon as I did that, my times fell back to 1.4.0 times.
Here’s some pseudocode of the most troublesome method:
for type in json:
for id in json[type]:
// fires observers
As soon as I wrapped that method with beingPropertyChanges and endPropertyChanges, the speed was fine.
So I guess the real issue is that I was writing extremely inefficient code (no fault of Ember’s). However, it does raise the question: what exactly changed between 1.4.0 and 1.5.0 that caused that code to suddenly become too inefficient?