Unity takes up 2GB more memory...

6895229--806684--upload_2021-3-2_14-7-14.png

At idle, same project. Looks like a bug, mem leak maybe, I didn’t investigate. logged as 1318741

4 Likes

Is this the same project opened with the same Unity version or different version? Was one Unity instance been running longer than the others?

Same project running in different versions, the one that eats up 4.5GB is 2021 and the other one is 2020.1, both started around the same time

Interesting I get that same memory footprint on startup in 2020.2 that just started sometime this last week. Judging by editor logs what is going on is unity is loading a bunch of assets into memory that it shouldn’t be. It actually climbs to around 20gb on my project during startup and then where it explicitly unloads unused towards the end it drops back down to 4-5gb range. It shows unloading 78k assets in my editor log, which seems way beyond reasonable.

And the 4gb never goes down. Let it sit all night was still there. So it has to be a bug and the memory never being free’d is probably just a side effect memory leak.

Did you by chance upgrade VS to 16.9? I had some reason to believe that might be at play here. Timing and the editor logs consistently show Roslyin terminated messages. Along with messages about shader import version being wrong and it’s compiling shaders every load which I don’t think it used to do.

I feel the same way as @snacktime , after VS16.9 something is not quiet right. Also, VS 16.9 seems to have some issue of having multiple window tab across different display monitor and then opening another script through Unity causes everything else to close down except the script just opened, which is major pain to work with.

Also get this with latest Rider, so its not just VS related

1 Like

Please file a bug for the multiple window issue using the Help > Submit Feedback > Report a problem. Thank you!

I use Rider so I think @MadeFromPolygons_1 is right, this is not VS related and only happens in 2021.x
@John_MSFT this whole thing reminds of Softimage XSI, were you around MS back in 2000?

By VS most of us mean everything it comes with not just the IDE. In this case in particular build/compiler tools that Unity uses would I think be most suspect. And what IDE is involved probably not important.

In this case, Unity uses it’s own shipped Roslyn so we think it’s not related to VS or any IDE right now. In the meantime, we’ve talked with some folks at Unity about this and it’s being investigated. Filing a bug with Unity is the right step here for now. Thank you!

1 Like

No. :slight_smile: