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 updates #409

Merged
merged 5 commits into from
Oct 15, 2024
Merged

Performance updates #409

merged 5 commits into from
Oct 15, 2024

Conversation

wouterlucas
Copy link
Contributor

Stash of small performance updates:

  • Removal of lots of redundant const creations
  • Introduced a Texture Type to avoid more expensive instanceof checks
  • Small refactor on flipY detection with RTT
  • Reduced immediate GC pressure on node destroy by setting values to undefined over explicit delete
  • Skip sanitizing custom data on node creation if inspector is disabled

Performance changes:

create: 60.24ms ±17.30 ->  50.07ms ±8.84
update: 30.66ms ±1.50 -> 28.87ms ±9.51
skipNth: 24.32ms ±7.00  -> 22.81ms ±5.22
select: 27.72ms ±12.20  -> 26.44ms ±15.72
swap: 28.14ms ±14.80 -> 24.16ms ±12.71
remove: 25.72ms ±5.20 -> 22.83ms ±5.25
createLots: 303.16ms ±141.40  -> 258.30ms ±50.86
append: 282.90ms ±36.70 -> 283.57ms ±191.68
clear: 14.76ms ±1.50 -> 14.59ms ±5.86

src/core/CoreNode.ts Outdated Show resolved Hide resolved
@wouterlucas wouterlucas added this pull request to the merge queue Oct 15, 2024
Merged via the queue into main with commit 76c563d Oct 15, 2024
2 checks passed
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