Open
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.