-
Notifications
You must be signed in to change notification settings - Fork 921
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
Minimize moves by introducing WeakVec
#6419
Conversation
2d0b749
to
8e55502
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditionally approving based on user confirmation that this does, indeed, solve a problem for them. I'm open to merging in the absence of that feedback, but I think waiting a day or so to confirm would be good.
Unfortunately it seems like bevy still has the issue with this PR. It might be slightly faster though. I have the bevy branch with this pr up if you wanted to play with it. First frame time with 119619ms: bevy w/ minimize-moves vtune filtered in on just the part that is hanging w/ minimize-moves: |
This is worst case scenario for this code path. We can alleviate this issue further by running the code every X invocations of push rather than on every invocation - I will give it a try. |
I pushed another commit that should be a good balance between perf and memory use. @DGriffin91 & @tychedelia could you give it a try? |
@teoxoy Yay! Validated on Metal and Vulkan That seems to do it. 🎉✨ |
This should improve the situation in bevyengine/bevy#15893.
Follow-up to #5874.
@DGriffin91 could you give this PR a try?