Skip to content

Replace forEach by for..of for performance reasons #16513

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

Merged
merged 12 commits into from
Apr 21, 2025
Merged

Conversation

deltakosh
Copy link
Contributor

No description provided.

@deltakosh deltakosh changed the title Initial push Replace forEach by for..of for performance reasons Apr 21, 2025
@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

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 Apr 21, 2025

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 Apr 21, 2025

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 Apr 21, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

David Catuhe added 2 commits April 21, 2025 12:01
@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

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 Apr 21, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

David Catuhe added 2 commits April 21, 2025 13:36
@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

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 Apr 21, 2025

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 Apr 21, 2025

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 Apr 21, 2025

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 Apr 21, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

@deltakosh
Copy link
Contributor Author

@RaananW: this is a first path. All the hot path is now under the new for..of approach. We need to setup a linting check to ensure we do not reintroduce new ones on the core lib

@deltakosh deltakosh marked this pull request as ready for review April 21, 2025 22:51
@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/16513/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/16513/merge/?snapshot=refs/pull/16513/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/16513/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Apr 21, 2025

@deltakosh deltakosh merged commit 04b0208 into master Apr 21, 2025
19 checks passed
@deltakosh deltakosh deleted the no-more-for-each branch April 21, 2025 23:27
deltakosh pushed a commit that referenced this pull request May 15, 2025
Following up on PR #16513 that switched from forEach to for loops.

Replace return statements with continue in various loops to ensure that
the iteration continues instead of exiting the function.
RolandCsibrei pushed a commit to RolandCsibrei/Babylon.js that referenced this pull request May 15, 2025
Following up on PR BabylonJS#16513 that switched from forEach to for loops.

Replace return statements with continue in various loops to ensure that
the iteration continues instead of exiting the function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants