bevyengine / bevyengine/bevy

Memory Profiling Support

Open
#6,927 2 comments 3 reactions 0 assignees View on GitHub
A-Diagnostics C-Feature
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?
The `3d_scene` example currently uses 107.5 MB of resident memory on my machine, even with all of the optimizations enabled. For a simple rendered scene of a box and a plane, I'd expect that to be lower. To better address this, it's important to be able to profile and monitor the memory behavior of Bevy apps.

## What solution would you like?
Either better docs or tooling for the following:

- Live memory snapshotting: finding what is allocating, how big are the allocations, what feature is it tied to.
- Allocation behaviors: When are allocations being allocated, when are they being freed?
- Cache behaviors: L1/L2/L3 cache hit rates.

For best platform support, this ideally should also support doing this remotely, though this might be dependent on platform specific tooling.

## What alternative(s) have you considered?
Blindly start shrinking data structures and cutting dependencies until memory usage goes down.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.