bevyengine / bevyengine/bevy

Bevy caldera hotel_01 scene loads slowly in debug with opt3

Open
#21,491 0 comments 0 reactions 0 assignees View on GitHub
A-Assets C-Performance S-Needs-Review
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

# Bevy version 0.17.2 (I don't think this is a new issue though)

- 7950x, RTX4070ti

https://github.com/DGriffin91/bevy_caldera_scene

This scene loads caldera hotel_01. It uses:
```
[profile.dev.package."*"]
opt-level = 3
[profile.dev]
opt-level = 3
```

In release it loads in a few seconds, but in debug it takes over 13min to load.

3min are spent in `system{name="bevy_render::mesh::allocator::allocate_and_free_meshes"}`
10min are spent in `submit_graph_commands` `\bevy_render-0.17.2\src\renderer\graph_runner.rs:86` in `system{name="bevy_render::renderer::render_system"}`

The first 3min chunk in vtune:
Image

The second 10min chunk in vtune:
Image

Contributor guide

Open the contributing guide

Research direction

Reproduce the external bevy_caldera_scene case with the shown debug and release profile settings, then profile the loading path. Start with bevy_render::mesh::allocator::allocate_and_free_meshes and bevy_render/renderer/graph_runner.rs:86 in submit_graph_commands; done means identifying and addressing the debug-only slowdown so the scene no longer takes over 13 minutes to load.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.