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

onBeforeRender/onAfterRender from constructor to prototype #11288

Merged
merged 1 commit into from
May 14, 2017

Conversation

lojjic
Copy link
Contributor

@lojjic lojjic commented May 5, 2017

Move the default onBeforeRender/onAfterRender empty functions from each instance to the prototype, for constructor speed and retained memory improvement.

Measurements for 100K objects:

  • constructor exec time: 1620ms -> 1500ms
  • onBeforeRender/onAfterRender call time: 4.5ms -> 1.1ms
  • retained size: 133MB -> 121MB

…ch instance to the prototype, for constructor speed and retained memory improvement.

Measurements for 100K objects:
- constructor exec time: 1620ms -> 1500ms
- onBeforeRender/onAfterRender call time: 4.5ms -> 1.1ms
- retained size: 133MB -> 121MB
@mrdoob mrdoob merged commit 553d17f into mrdoob:dev May 14, 2017
@mrdoob
Copy link
Owner

mrdoob commented May 14, 2017

Thanks!

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.

3 participants