Node Material Clones Are Leaking EditorData

In this example, we can see that if we parse the same material (with the same name) and then create a clone (also with a consistent name) we see the material.editorData.map object growing every time.

If you set the editorData to null before cloning it seems to solve the problem.

On it :slight_smile:

It was not a leak but I understand the confusion
Look at the PR:
Replace array by indexer to avoid creating non necessary large array by deltakosh · Pull Request #17313 · BabylonJS/Babylon.js

We were using an array to store the map and because block ID are getting bigger the array seemed bigger but most of the cells were simply empty.

Depending on browser implementation it could be a problem so I replaced it :wink:

Thanks!

1 Like

We noticed in the Chrome profiler that serialize was taking longer and longer each time, and it seemed to be due to this object growing over time.

I saw this was merged but is there a way to see if this was released to NPM?

A new update will go to npm on thursday at the very least (but we may push a patch in the meantime)

Let me know if you need it urgently

Only if it’s not too much trouble or breaks your proces :slight_smile:

Nope we can do it for you :wink:

1 Like

Here we are dear sir: Release 8.32.2 · BabylonJS/Babylon.js

1 Like