emberjs / ember.js

Ember.js - A JavaScript framework for creating ambitious web applications
https://emberjs.com
MIT License
22.47k stars 4.21k forks source link

Sluggish route transition performance (on Phonegap) #3147

Closed avitalbn closed 11 years ago

avitalbn commented 11 years ago

After upgrading our Ember installation to rc7 from "Last commit: fe83069 (2013-08-05 17:48:30 -0700)" transitions in Phonegap regressed back to sluggish performance that was present in rc6.

wagenet commented 11 years ago

Are you able to run a git bisect to find the commit that causes issues?

avitalbn commented 11 years ago

No, sorry. we're not really pulling from GitHub at this point; we've been importing the min versions directly from the Ember website into our project. Our project is still in demo stage.

I think it would be good to reference this thread from Discuss: http://discuss.emberjs.com/t/ember-rc6-and-phonegap-slow/1745/21, as it seems to pertain very well to the problems we are experiencing in performance.

wagenet commented 11 years ago

@avitalbn It's probably fixed by 4f190dfe4b6ff603596c15f37a813f0177abcb50. Can you verify?

stefanpenner commented 11 years ago

a source of perf issues, especially on low powered devices is accidental auto-runs. I would ensure that no such auto-runs are occurring. (this may be unrelated, or may now be manifesting as described above.)

Setting: Ember.testing = true will raise when auto-runs occur.

machty commented 11 years ago

@avitalbn can you confirm that you're using the production build of ember RC7? The dev version contains asserts that were greatly slowing down performance on mobile.

avitalbn commented 11 years ago

Yep, I tested this link from the Ember website http://builds.emberjs.com/ember-1.0.0-rc.7.min.js, then built with with Phonegap. But I will happily test again. @wagenet I will also test the snapshot you mentioned. Thanks.

stefanpenner commented 11 years ago

@avitalbn can you also try http://builds.emberjs.com/ember-latest.js

stefanpenner commented 11 years ago

@avitalbn would it be possible for me to experience the slugishness on your app, maybe a remote pairing session sometime this week?

avitalbn commented 11 years ago

@stefanpenner I can send you an APK for android built with Cordova. I think that would be the best way to exhibit this issue. However I haven't quite figured out how to remotely debug this on the device just yet.

sandstrom commented 11 years ago

We had similar performance issues on route transition in our Android client, something like ~500% slower. It is only in the dev build, no slowness with the production build (e.g. caused by some assert).

However, a decently quick development build would be useful regardless. It's nice to have the asserts etc. when running dev builds on mobile devices.

Unfortunately I can't provide more info, we never managed to track down which assert caused the slowness. But if there are proposed solutions I'd be happy to help out trying them on our codebase too.

stefanpenner commented 11 years ago

@sandstrom we recently boosted perf of the assertions, has it had some effect for you?

sandstrom commented 11 years ago

@stefanpenner Yes, the extreme slowness seems to be gone now. Awesome! :sailboat:

[we'll still use the production build in production, but it's nice to be able to develop with assertions]

stefanpenner commented 11 years ago

https://github.com/emberjs/ember.js/commit/4f190dfe4b6ff603596c15f37a813f0177abcb50 should have done at least some of the tricks. low-tech hammer.

sandstrom commented 11 years ago

@stefanpenner Nice! Hammers aren't to be shunned :)