#Memory optimization

1 messages · Page 1 of 1 (latest)

fresh harness
#

I know what assets are left there from the memory

hot axle
#

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?

fresh harness
#

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

hot axle
fresh harness
hot axle
#

You can open the discord in the browser without leaving any personal info. Clear the browser history and cache if needed after using it.

fresh harness
#
  1. I start the main menu from very beginning, 5.2 gb memory reservation
  2. I play the first gameplay map, 5.2gb still
  3. I return to main menu, 6.4 gb
  4. I return to the first gameplay map, 6.4 gb
  5. I return to main menu, 6.55 gb
  6. I return to first gameplay map, 6.55 gb
  7. 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

hot axle
fresh harness
#

I measured that with PIX

#

PIX told me that the used memory is currently almost exactly the same

hot axle
#

I don't know human mistake is very common during debugging. You might not be lying intentionally, but just missing something or misinterpreting information.

fresh harness
#

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

hot axle
#

Okay, so do you see what is being allocated during the peak memory consumption in pix?

fresh harness
#

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

hot axle
fresh harness
#

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

hot axle
fresh harness
#

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

fresh harness
#

@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

fickle coral
#

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

fresh harness
#

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

fresh harness
#

and I think it would be hard to know this