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

[Perf improvement] move bind to Arrow functions #14394

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

RaananW
Copy link
Member

@RaananW RaananW commented Oct 5, 2023

This is a suggestion to move every bind(this) call to use arrow functions, as they are much faster.

I especially want to move the render function binding in the engine to use arrow function.

This is just a suggestion, and of course can be discussed.

@RaananW
Copy link
Member Author

RaananW commented Oct 5, 2023

A basis for the discussion is this:

image

I can't seem to share this perf test for some reason ATM. working on that. This is the result of defining the function and running it as part of the perf test.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 5, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 5, 2023

@deltakosh deltakosh merged commit e6504c3 into BabylonJS:master Oct 5, 2023
10 checks passed
@RaananW RaananW deleted the noBindWherePossible branch October 5, 2023 17:10
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.

None yet

4 participants