Introducing the Luau VM memory exploration tools

Yeah I already saw, I appreciate it! Look forward to the future.

4 Likes

What about this memory leak?

7 Likes

Are these snapshots saved to file? It’d be nice to be able to compare snapshots by saving them as a json or something

3 Likes

‘global’ mainly refers to allocations made by Roblox engine itself for internal structures like storage for Luau->Engine instance links and thread tables.

Memory used by Roblox background scripts is not included in this tool at all (like CoreUI controls).

Public engine scripts injected to the experience like ‘CameraModule’ should be under the corresponding ‘CameraModule’ memory category.

4 Likes

No, there are no plans right now to save/load files from this tool.
In the future, if API is unlocked, custom plugins might implement this function.

6 Likes

Oh my god, amazing. I never thought this would happen, but here we are!

7 Likes

It’s great to see this finally added, I’ve already been able to put it to use & find a couple of memory leaks which I didn’t know about, however it’s pretty lacking in multiple regards.

  • The UI is pretty shocking & hard to follow. I don’t think this should’ve been shoehorned in to the existing developer console. There’s many open source heap dump visualisers that y’all could’ve taken some inspiration from such as YourKit, rather than this long, strangely formatted & confusing table approach.

  • I would regard it as a critical feature to be able to store & load snapshots, and as a result this would allow us to develop our own external tools to parse & visualise these snapshots in a nicer manner, or perhaps even link the snapshots in with our IDEs in some manner.

Regardless, I’m happy to have it now rather than not having it at all, I just wish the front end & UX was considered to a greater extent.

7 Likes

This is weird. It’s documented that when instances are destroyed, aka when a player leaves, all instance connections are destroyed, so why does this behavior occur?

4 Likes

So, with this can you give us an example if what a data leak would look like? Where tabs should we be looking at and which row and such? Thanks.

6 Likes

This is the update of all time guys

(okay but on a real note, this REALLY helps me make sure how performant each module/system is in a game, and which ones are potentially leaking memory)

6 Likes

Curious what the difference between proto and function is here considering they’re (mostly) the same thing, does function refer to spawned closures?

PLEASE I COULD DO SO MUCH FUN STUFF WITH THIS

5 Likes

This is what I always assumed as well, until that announcement about PlayerCharacterDestroyBehavior came out. It seems like this was never the case for Players, they just got parented to nil without getting destroyed, hence the memory leak I was experiencing. So if you DO want the player (and their character) to get actually destroyed, set PlayerCharacterDestroyBehavior in workspace to Enabled.

6 Likes

Yes, ‘proto’ is short for the ‘prototype’ of the function and function (or closure, not confusing at all) refers to an instantiation of that.
Often there is only one instantiation, but there could be many if it’s defined inside a loop or connected to multiple signals.

Documentation will have a small guide that should have been included in the announcement as well.
Maybe even attach a hint inside the table - original names were defined internally more than a decade ago.

4 Likes

Is this a memory leak from Roblox chat? Or is this intentional?

5 Likes

This new feature for Server isn’t working in my game, regardless of new server or old

When I try to create a snapshot, nothing happens.
Works fine in studio, my other games production servers work as well

5 Likes

Great! Now we Ui designers are awaiting a new user interface for the console. It would be a very nice addition and it would make my life debugging quality much better.

4 Likes

Can an ability to export snapshots w/ comparisons be added?

3 Likes

image
What is this and how can I view it in more detail? I know the original post said small entries would be shown as “…”, but I believe this is a considerable amount more than 2 KB.

4 Likes

In this case, there are multiple entries at the current level that are all smaller than 2KB.

If the original was:

A 400000
> B1 10000
> B2 1500
> B3 1500
> B4 1500
> B5 1500

It will display as:

A 400000
> B1 10000
> ... 6000

In some cases, there might be thousands of even smaller elements and displaying that thousand can be more than the Roact can handle.
But we understand that in some cases developers need to dig deeper and see those entries, there will be updates to control this limit.
In my example, we still believe that in many cases you can focus on ‘A’ and knowing what it is, explore what’s stored in there from the source code. Not always though.

7 Likes

Can’t believe we got this, we really really needed it, thanks!

4 Likes