#Memory optimization
1 messages · Page 1 of 1 (latest)
You only know about the materials and material property blocks. But you said that you don't want to address them.
Or is there something else that you know?
there is, its just very hard to always make screenshots from a fully different PC, transfer that image into my own PC and post that to here
let me describe what is the situation
Well, that sounds like an issue with your workflow.
I just don't want to leave personal stuffs and passwords, etc. everywhere in a company machine
You can open the discord in the browser without leaving any personal info. Clear the browser history and cache if needed after using it.
- I start the main menu from very beginning, 5.2 gb memory reservation
- I play the first gameplay map, 5.2gb still
- I return to main menu, 6.4 gb
- I return to the first gameplay map, 6.4 gb
- I return to main menu, 6.55 gb
- I return to first gameplay map, 6.55 gb
- I return to main menu, 6.67 gb
etc. etc.
I also compared the 1. and 3.
and from that, I saw animation clips, and a lot of other stuff, left in memory
from the gameplay map
in the references, it was assetbundles
I really doubt that the gameplay map is consuming as much as your main menu.
then I lie to you probably...
I measured that with PIX
PIX told me that the used memory is currently almost exactly the same
I don't know human mistake is very common during debugging. You might not be lying intentionally, but just missing something or misinterpreting information.
I have checked it multiple times
maybe PIX is like a pilot exam, but I saw the curve staying around 5.2-5.3 gb
and jumping back when I returning to main menu
which can be logical, since before my strong optimization efforts
there were times, when I couldn't return to main menu
because of crashes
and I had crashes usually when returning to main menu, not when opening maps
Okay, so do you see what is being allocated during the peak memory consumption in pix?
so, pix still won't tell me what are reserved, because pix doesn't understand unity things
so I didn't even bother
in the memory profiler, I saw a lot of things
It should give you the callstacks. Assuming you have debug symbols paths configured properly
unfortunately again, the hugest stuff was like a 20 mb sized shader
so I can't eliminate all of those one by one
there's no time for that
Well, it's not normal for a shader to be loaded over and over again.
I know, there were also gameobjects loaded over and over again
but these are small
and coming from thousands of manager classes
I can't understand how all of these work in a very short time
so my only chance is to hold on to that gameplay enemy related stuff, which was not loaded in the 1. point
but loaded in the 3. point
(when I returned to main menu)
and that is referenced frm a bundle
so I try to fix that now
with the "Pack Separately", because I have read yesterday in a long comment about what stuff I already did with bundles and they're appearently still loaded
at least a few
@fickle coral "I think splitting up large groups into smaller ones OR changing the pack mode to produce more bundles per group will help"
I have checked the bundle mode setted to "pack separately", and it made memory reservation worse
Its going to help only if a few assets are used frequently and most are not
Why? If we have 10 assets in a group and only 1/2 get used frequently then we understand its wasteful for a larger asset bundle to be used.
pack by label/seperate may therefore be better here
I have checked "pack together" as well, and it maybe helped a very small one
like from 6.46 to 6.41 gb
so its so small its not even worth it
honestly I don't know what stuff is used when
and I think it would be hard to know this