next solver on bevy render crate uses 7.3x more peak memory then without next solver
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
trying to build bevy_render from git or latest release with next solver has a warning
warning: overflow evaluating the requirement `IndirectParametersBuffers: Sync`
--> crates/bevy_render/src/batching/gpu_preprocessing.rs:976:10
|
976 | #[derive(Resource, Deref, DerefMut, Default)]
| ^^^^^^^^
|
= note: which requires `bevy_platform::collections::HashMap<TypeId, UntypedPhaseIndirectParametersBuffers, NoOpHash>: Sync`
= note: which requires `hashbrown::map::HashMap<TypeId, UntypedPhaseIndirectParametersBuffers, NoOpHash>: Sync`
= note: which requires `hashbrown::raw::RawTable<(TypeId, UntypedPhaseIndirectParametersBuffers)>: Sync`
= note: which requires `(TypeId, UntypedPhaseIndirectParametersBuffers): Sync`
= note: which requires `UntypedPhaseIndirectParametersBuffers: Sync`
= note: which requires `MeshClassIndirectParametersBuffers<IndirectParametersNonIndexed>: Sync`
= note: which requires `buffer_vec::RawBufferVec<IndirectBatchSet>: Sync`
= note: which requires `Option<render_resource::buffer::Buffer>: Sync`
= note: which requires `render_resource::buffer::Buffer: Sync`
= note: which requires `WgpuWrapper<wgpu::Buffer>: Sync`
= note: which requires `wgpu::Buffer: Sync`
= note: which requires `wgpu::dispatch::DispatchBuffer: Sync`
= note: which requires `Arc<wgpu::backend::wgpu_core::CoreBuffer>: Sync`
= note: which requires `wgpu::backend::wgpu_core::CoreBuffer: std::marker::Send`
= note: which requires `wgpu::backend::wgpu_core::ContextWgpuCore: std::marker::Send`
= note: and so on...
= help: consider adding a manual `impl` of auto traits like `Send` for intermediate types, if auto traits are involved
= help: or consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`bevy_render`)
= note: this lint is attached to the whole crate and can't be disabled on a per-function basis
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #159228 <https://github.com/rust-lang/rust/issues/159228>
= note: `#[warn(recursion_depth_exceeding_limit)]` (part of `#[warn(future_incompatible)]`) on by default
= note: this warning originates in the derive macro `Resource` (in Nightly builds, run with -Z macro-backtrace for more info)
and peaks at around 11gb of memory for me, compared to 1.5gb without next solver, making it quite hard to build on my system due to oom.
Meta
rustc --version --verbose:
rustc 1.100.0-nightly (e7769602a 2026-08-24)
binary: rustc
commit-hash: e7769602aca3770e8d8ea55716becb22e839a579
commit-date: 2026-08-24
host: x86_64-unknown-linux-gnu
release: 1.100.0-nightly
LLVM version: 23.1.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report by building bevy_render from git or the latest release with Rust's next solver enabled, using the reported nightly toolchain. Start with the recursion-limit warning at crates/bevy_render/src/batching/gpu_preprocessing.rs:976 and the referenced Rust issue #159228. Done means identifying why this path uses substantially more memory and preventing the warning or memory regression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100