Refactor check_light_mesh_visibility for performance #1#13905
Merged
alice-i-cecile merged 5 commits intobevyengine:mainfrom Jun 18, 2024
Merged
Refactor check_light_mesh_visibility for performance #1#13905alice-i-cecile merged 5 commits intobevyengine:mainfrom
alice-i-cecile merged 5 commits intobevyengine:mainfrom
Conversation
This reverts commit 6ce8c81.
This was referenced Jun 18, 2024
| check_light_mesh_visibility | ||
| ( | ||
| check_dir_light_mesh_visibility, | ||
| check_point_light_mesh_visibility, |
Member
There was a problem hiding this comment.
Do these systems need to be ordered relative to each other?
Contributor
Author
There was a problem hiding this comment.
It should not be necessary. The main reason for splitting the system is that in subsequent PRs, we hope they can be automatically parallelized by the bevy's scheduler.
alice-i-cecile
approved these changes
Jun 18, 2024
Member
alice-i-cecile
left a comment
There was a problem hiding this comment.
I've checked this over, and the refactoring / splitting appears to be done correctly. The core idea for why this should be done also makes sense to me :)
IceSentry
approved these changes
Jun 18, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jun 26, 2024
# Objective - Second part of #13900 - based on #13905 ## Solution - check_dir_light_mesh_visibility defers setting the entity's `ViewVisibility `so that Bevy can schedule it to run in parallel with `check_point_light_mesh_visibility`. - Reduce HashMap lookups for directional light checking as much as possible - Use `par_iter `to parallelize the checking process within each system. --------- Co-authored-by: Kristoffer Søholm <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Solution
check_light_mesh_visibilityintocheck_dir_light_mesh_visibilityandcheck_point_light_mesh_visibilityfor better review