-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
bevy memory usage grows over time #5691
Comments
This has been examined before; IIRC this is the result of logging enabled during debug builds. |
I can confirm that this is only happening in debug builds. when |
I let a game with only Default plugins running for some time, with use bevy::prelude::*;
fn main() {
App::new().add_plugins(DefaultPlugins).run();
}
Edit: It seems this is some internal memory/cache pool. I noticed when it was about to reach 500 MB it dropped to ~50 MB again and restarted the cycle. So I don't think there is a memory leak. |
Moving this to a docs issue then :) |
Does it also drop down in case of memory pressure from other program? If so, that should be fine, if confusing for end users. If not, it is probably still an issue. |
It was using around 800MB and then I launched 15 wasm bevymark with 500k sprites each to force Chrome do what it does better: eating ram. Then After a while it crashed, since the Windows ran out of ram:
|
Is there a way to disable this? fn main() {
App::default().add_plugins_with(DefaultPlugins, |group| { group.disable::<bevy::log::LogPlugin>() }).run();
} Still grows at an exceptional rate with |
Yep, we're getting another memory leak over in #6417: the logging is a factor, but far from the only issue. |
Maybe this will help someone, that's why I'm commenting. When I installed Vulkan, I started to get a Validation layers error, an error that does not stop the execution but causes a slight increase in memory over time.
It was solved by removing vulkan completely. |
On webbrowsers this results in crashed tabs after the app has been running for a while. However, we seem to be able to work around this by using: DefaultPlugins.build()
.disable::<LogPlugin>()
.disable::<DiagnosticsPlugin>(); |
Bevy version
0.8
What went wrong
I left a bevy app running in the background for a long time, and well, it grew to 12 GB memory usage over the course of ~8 hours.
The App is just a few planes and a simple controller system.
It seems that a bevy app just with the default plugins and nothing else also grows over time, so it's not my code but a bevy problem.
The text was updated successfully, but these errors were encountered: