Developer Console Memory Profiler Pain Points

As a Roblox developer, I need to understand how memory is being used in my game so that I can minimize the amount of out-of-memory crashes that players experience.

Today, Roblox provides some dropdowns in the developer console to break down memory usage of textures, meshes, and sounds by asset ID:

but this information is hard to use. The asset IDs cannot be copied from the UI, so I have to manually type them, one by one, into the command bar or a script. I have thousands of assets used in my game, so needless to say this process is excruciatingly painful and long. So much so that we can only run this analysis partially across just the top few assets, sparingly, even as our game is updated regularly. Our only other option is to trawl the place file for every asset in use & download them to get their size, but this is also problematic because it doesn’t tell us their practical cost during real gameplay (half of them may be loaded out of memory through streaming, for instance).

I would like a Lua API similar to GetMemoryUsageMbForTag which enables me to programatically query all currently loaded assets in the game, their size, and ideally the Instance the asset is in use for (if applicable) so that we can instantly analyze where memory is being used in our game.

Improving the developer console UI would also help, such as being able to visually distinguish large assets & jump to where they are used in the game by clicking on them, as Unreal Engine offers in its Size Map profiling tool

If Roblox is able to address this issue, it would improve my development experience because

  • I will be able to automate the tracking and warning of assets in memory, such as the frequency that certain assets take up memory, as changes are made to my game instead of periodic, partial analysis done sparingly
  • quickly and causally compare memory usage change over time by copying the current state to my clipboard, and then comparing it later - right now multiple screenshots / a custom script are the closest that can be found to this.

Thank you for reading!

12 Likes