Switch WgpuWrapper to a macro and have it compute Send/Sync eagerly - #25512
Open
SkiFire13 wants to merge 6 commits into
Open
Switch WgpuWrapper to a macro and have it compute Send/Sync eagerly#25512SkiFire13 wants to merge 6 commits into
Send/Sync eagerly#25512SkiFire13 wants to merge 6 commits into
Conversation
JMS55
reviewed
Aug 22, 2026
Member
|
Honestly i think thw 4 seconds are worth it, and it doesn't seem like many of the types are public if any at all? |
Zeophlite
approved these changes
Aug 23, 2026
Contributor
Author
Note that previously |
Member
|
It seems only bevy_pbr needs one of them as public, and for a usecase that i think could easily be changed to not need access to the wgpu wrapper type. tho i haven't looked how much WgpuWrapper is used across the ecosystem. Kinda wish it was easily possible to search all of crates.io (not just all of github) |
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
bevy_render-Znext-solverenabled by default #25511Solution
While investigating a wgpu trait overflow issue with the new solver I noticed that eagerly computing its
Send/Syncreduces the compile time ofbevy_renderby around 10 seconds (on my machine debug goes from 20s to 9s and release from 26s to 15s).I don't like too much having to expose all these types though, and we might get the same perf benefits if gfx-rs/wgpu#9953 is merged though (edit: I tested with that PR changes and that alone reduces compile times by ~6 seconds, however when this PR is added it reduces another ~4 seconds).