Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance test #84

Merged
merged 3 commits into from
Jan 7, 2020
Merged

Conversation

averydev
Copy link
Contributor

@averydev averydev commented Dec 3, 2019

Added a simple performance test. There is a slight performance dip on basic records, but it's fairly modest.
Averages are needed here because otherwise v8 gets too good at optimizing things, or memory usage can become a confounding factor.

Average Untracked 10 @ 200 :: 61.7 per iteration
Average Tracked 10 @ 200 :: 83.7 per iteration

If there are future regressions this would be a reasonable baseline.
The models here are simple to avoid overhead incurred by dependancies.

@averydev
Copy link
Contributor Author

averydev commented Jan 7, 2020

The evented mixin has been deprecated because of the performance hit taken by using hooks like ready() and pals. In addition, even when silenced, deprecations have a non-trivial performance impact.

Prior to this PR, those hooks were being set whether the model was being actively tracked or not, causing a significant performance hit, at least in Ember 3.14+.

This PR makes it so this overhead is no longer incurred on every single model regardless of its tracking status. It also reduces the deprecations to only those that are activated for tracking.

End result is that it appears that performance is significantly improved.

@danielspaniel danielspaniel merged commit 3b8197e into danielspaniel:master Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants