Commit 785d5e9
authored
Parallelize
This tiny system loops over all instances and can actually show up in
the profile when the instance count reaches the millions. This PR fixes
that. The `mark_meshes_as_changed_if_their_materials_changed` system in
`many_cubes --no-cpu-culling --instance-count 3000000` (with PR #23101
applied) goes from 2.92 ms per frame to 0.669 ms per frame with this
patch applied, a 4.4x speedup.
Before and after:
<img width="2756" height="1800" alt="Screenshot 2026-02-21 143243"
src="https://github.com/user-attachments/assets/556b0ca2-28e8-4f01-960a-57690ab54fb4"
/>mark_meshes_as_changed_if_their_materials_changed. (#23103)1 parent b681681 commit 785d5e9
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
657 | | - | |
| 657 | + | |
658 | 658 | | |
659 | | - | |
| 659 | + | |
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
| |||
0 commit comments