Conversation
|
@chancancode to clarify, there was not a 300ms timer that fired infinitely. Updates were fired when the |
|
@rwwagner90 This is unrelated to how we update the render tree. This is just how we update the currently inspected object. When you call updateCurrentObject (which we always do in init as of now), at the end of the method, it will always unconditionally (even when there isn’t a current object) schedule a setTimeout that calls itself again, run-wrapped, which will then schedule another timer, etc. Worse, i think it’s actually possible to call this method multiple times and end up with a set of 300ms infinitely repeating timers. |
de58714 to
53b453d
Compare
|
Awesome! Really good work. |
Previously, the object inspector would schedule an infinite timer that fires every 300ms to update the current object (it actually fires even where there isn't a current object to update). This is extremely inefficient, and it causes a lot of extra work in big apps, since the timer starts a runloop which results in a full top-down revalidation. The more appropriate thing to do is tap into the runloop callbacks, since as far as Ember is concerned, if there are no runloops, there are no observable changes.
| Object: EmberObject, inspect: emberInspect, meta: emberMeta, | ||
| computed, get, set, guidFor, isNone, | ||
| cacheFor, VERSION | ||
| cacheFor, VERSION, run, |
There was a problem hiding this comment.
Thank you for not nesting this!
Previously, the object inspector would schedule an infinite timer that fires every 300ms to update the current object (it actually fires even where there isn't a current object to update). This is extremely inefficient, and it causes a lot of extra work in big apps, since the timer starts a runloop which results in a full top-down revalidation. The more appropriate thing to do is tap into the runloop callbacks, since as far as Ember is concerned, if there are no runloops, there are no observable changes.
Previously, the object inspector would schedule an infinite timer that fires every 300ms to update the current object (it actually fires even where there isn't a current object to update). This is extremely inefficient, and it causes a lot of extra work in big apps, since the timer starts a runloop which results in a full top-down revalidation. The more appropriate thing to do is tap into the runloop callbacks, since as far as Ember is concerned, if there are no runloops, there are no observable changes.
Previously, the object inspector would schedule an infinite timer that fires every 300ms to update the current object (it actually fires even where there isn't a current object to update). This is extremely inefficient, and it causes a lot of extra work in big apps, since the timer starts a runloop which results in a full top-down revalidation. The more appropriate thing to do is tap into the runloop callbacks, since as far as Ember is concerned, if there are no runloops, there are no observable changes.
Previously, the object inspector would schedule an infinite timer that fires every 300ms to update the current object (it actually fires even where there isn't a current object to update). This is extremely inefficient, and it causes a lot of extra work in big apps, since the timer starts a runloop which results in a full top-down revalidation. The more appropriate thing to do is tap into the runloop callbacks, since as far as Ember is concerned, if there are no runloops, there are no observable changes.
Split from #1088. I'll rebase that PR once this lands.