refactor: remove threshold configuration from StaticTransformOptimiza…#23193
refactor: remove threshold configuration from StaticTransformOptimiza…#23193andristarr wants to merge 7 commits intobevyengine:mainfrom
Conversation
alice-i-cecile
left a comment
There was a problem hiding this comment.
Can you refactor this type to just be a plain enum now too? Much simpler!
|
It looks like your PR is a breaking change, but you didn't provide a migration guide. Please review the instructions for writing migration guides, then expand or revise the content in the migration guides directory to reflect your changes. |
|
@alice-i-cecile done, can you please check if this is what you had in mind? |
alice-i-cecile
left a comment
There was a problem hiding this comment.
Fantastic; that's so much simpler. Can you please add a migration guide and then I'll be happy to approve this.
Make sure to remember to advise folks that they can just count the entities themselves and dynamically toggle this if desired.
release-content/migration-guides/remove_threshold_StaticTransformOptimizations.md
Outdated
Show resolved
Hide resolved
release-content/migration-guides/remove_threshold_StaticTransformOptimizations.md
Outdated
Show resolved
Hide resolved
release-content/migration-guides/remove_threshold_StaticTransformOptimizations.md
Outdated
Show resolved
Hide resolved
…ormOptimizations.md Co-authored-by: Alice Cecile <[email protected]>
…ormOptimizations.md Co-authored-by: Alice Cecile <[email protected]>
…ormOptimizations.md Co-authored-by: Alice Cecile <[email protected]>
release-content/migration-guides/remove_threshold_StaticTransformOptimizations.md
Outdated
Show resolved
Hide resolved
|
@alice-i-cecile done! |
| roots.par_iter_mut().for_each_init( | ||
| || queue.local_queue.borrow_local_mut(), | ||
| |outbox, (parent, transform, mut parent_transform, children, transform_tree)| { | ||
| if static_optimizations.enabled && !transform_tree.is_changed() { |
There was a problem hiding this comment.
these diffs would be a bit smaller if you added a .is_enabled() method to StaticTransformOptimizations.
Then static_optimizations.enabled could become static_optimizations.is_enabled() instead of a large equality check.
Objective
StaticTransformOptimizations::from_threshold#23192 by removing the threshold from the associated functionsSolution
Migration guide