You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if any listeners were attached in onload we trigger a rerender as state
// may have changed between createElement or unload/load
if(this[unloaders].length)this.render()
}
We should shadow bind this._reallyUpdate in the constructor since update could be called at a high frequency (e.g. some kind of animation loop that uses this.update() to render new frames.)
On the first one: _onload could already be inside a RAF call, that's why it goes directly to this.render() to avoid a flicker of uninitialized state. onload is called when the element enters the DOM anyway, and this is at the cost that it could do a double render in the same frame, but barring the flicker that would otherwise occur.
When this.update() is called, it creates bound functions every call, which, (at least historically) has caused memory/perf issues in some cases. Switching it to a predefined bound function on the instance only creates a bound function once, on instantiation.
This should be
this.update()
instead ofthis.render()
to take advantage of the raf management yeah?hui/index.js
Lines 82 to 88 in 568c274
We should shadow bind
this._reallyUpdate
in the constructor since update could be called at a high frequency (e.g. some kind of animation loop that usesthis.update()
to render new frames.)hui/index.js
Lines 53 to 57 in 568c274
Thoughts?
The text was updated successfully, but these errors were encountered: