Skip to content

Conversation

@mixonic
Copy link
Member

@mixonic mixonic commented May 22, 2019

For ember-tr and ember-td minimize CPs. This minimizes the watchers that need to be maintained.

@mixonic mixonic force-pushed the mixonic/minimize-cps branch 2 times, most recently from c064528 to 92d3fed Compare May 23, 2019 12:55
@mixonic
Copy link
Member Author

mixonic commented May 23, 2019

I've had success with these changes in a downstream app. In a production build running:

console.time('scroll'); $('.ember-table')[0].scrollTop = 4000; window.requestAnimationFrame(() => window.requestAnimationFrame(() => console.timeEnd('scroll')));

The timing was ~750ms. After these changes it was ~100ms faster. This is not a very scientific number :-p

The idea is that most of the time spent during render is not in the rendering engine, but instead setup/teardown of dependencies. By creating less CPs we can minimize the necessary book-keeping. A bunch of work moves into the template layer, but that is already faster in old versions of Ember and improves throughout Ember's releases.

Most of the work is in `_sync` Screen Shot 2019-05-23 at 9 08 25 AM

@mixonic mixonic force-pushed the mixonic/minimize-cps branch from 92d3fed to f9b8ab7 Compare May 29, 2019 22:16
@mixonic mixonic force-pushed the mixonic/minimize-cps branch from f9b8ab7 to 2e74c4f Compare May 1, 2021 01:36
@mixonic mixonic force-pushed the mixonic/minimize-cps branch from 2e74c4f to 2132302 Compare May 1, 2021 01:38
@johanrd johanrd mentioned this pull request Nov 18, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants