Duplicate mesh memory (bug?) from skinned meshes

I have been profiling memory performance lately and noticed that skinned meshes (the mesh has bone weights) are duplicated in memory. This sucks for mobile.

The proof I have that this is happening is lots of time spent debugging in Xcode Instruments. If the meshes have their blend weights removed, suddenly the memory reduces, and the line for it in the call tree disappears. The only memory that stays for it is in the buffer creation on the GPU side.

Please note, this is with meshes that are not readable ( UploadMeshData(true) ), so it is not because of that.

I think I know why this is happening. I imagine it’s because skinned meshes need to have their data on the CPU for skinning, but in our case, we don’t use CPU skinning, only GPU skinning. So we do not need the data on the CPU at all.

We have about 70 MB of skinned meshes that are duplicated in memory, leading to 140 MB. Good memory usage makes a huge difference on mobile, and so fixing things like this are extremely important to us.

We would like to find a fix for this asap. Any thoughts?

Please report this as a bug through Report a Bug in the Unity Editor and provide a very small project that reproduces.

Bug Report :

Case 1427151

@JeffDUnity3D I appreciate your help. Any updates?

Did you get a confirmation by QA for this?

1 Like

Ah thanks. I forgot about the issue tracker. Still nothing new there though.

Been quite a while with still no updates. Is the process normally this slow for critical bugs like this?

@JeffDUnity3D Any news on this issue? This is a really big issue for mobile…

On my end, I went back and forth over email, had a call with 3 different people from Unity (I think a dev, manager, and sales guy were on the call). After all that, I went back and forth a bit over email further.

At first it was marked as not even being able to reproduce. I then emailed them saying that the ticket had exact instructions and a repro project. They then sent another email saying they had reproduced it. On the call, I was once again asked how to reproduce it (I guess they didn’t actually figure it out when they said they did?). I showed them, and the dev seemed to understand.

In the end, I never saw any updates to the ticket that got created, and I have no reason to believe they care enough to fix the issue. It was quite appalling to be honest, as I felt that I was trying to be sold Unity support solutions rather than them just fixing the issue. Their sales guy really was trying though :smile:

I would love to be wrong in this case and see the issue get fixed. But for now, we still have the issue, and I will most likely end up writing my own skinned mesh renderer system, just as we have done for most rendering solutions in Unity.

1 Like

Been 6 months now. This is honestly ridiculous. This costs us almost 100 MB on mobile. The last update on the bug report was from the middle of July. And that was just that it got assigned to someone. I looked the guy up and apparently he isn’t even a dev, just a tester.

I don’t know why Unity keeps pushing this bug off. It’s such a critical performance issue. I am speaking to Unity now when I say “do you really not care about performance issues? or is it just this one you don’t care about?”

We have over 50 million installs on our Unity games, and let me tell you that our players care very much about performance issues. I already submitted a very simple test repro project. I’ve had a call with a dev to explain the issue. I have went back and forth over emails. I have identified exactly the line of code in the Unity library where this is happening.

I am trying to make this as easy as possible for Unity to fix. Literally doing your job for you.

Please help me help you. Can I at least get a response with some truth to it, that you are working on it or will take another look at it at least and then we can go from there?

1 Like