Download

World Composition memory usage

Hello,

I’m testing world composition for some reason even though I have all my tiles unloaded and invisible my memory usage stats is still as if I had all the tiles loaded on screen. Is it something I am missing?

Edit: That’s the floor mesh in the screenshot, not a landscape tile.

Seeking for answers.

Perhaps UE4 has cached the contents?
It could be PhotoShop: Closing the document(s) does not cause PS to release the memory as it will use that for the next document/operation.

HTH

I’m 90% certain it’s caching. Case in point: When you open the editor the first time and load all the levels, it can take quite some time to load everything up. Then unload all the levels, but don’t close the editor. Go open a completely different map even. Then go back to the World Comp level and load all levels again. It positively flies through the load the second time. Only way it does that is by caching.

Even after the editor is closed, it could be possible that Windows just keeps the files in memory because free memory is basically just wasted memory.

So what’s the point of using world composition and unload tiles if it’s consuming the same amount of memory as if I had it all loaded at once all the time?

There won’t be any problem if UE4 is caching the memory.
Either the cached memory will be reused for any new assets to load.

Memory caching helps by only requesting more memory from the OS when it needs to, Photoshop reuses memory and the only “problem” that happens is if there is another RAM hungry app running aswell.

There may be a (C++) function or command to flush cached memory.

HTH

This is only an editor feature I would imagine. The final game likely won’t do this. If you want to profile your game’s memory usage, do it with a cooked executable, not in the editor.

But assuming in the stand alone .exe it doesn’t use that much memory I still wouldn’t be able to work in editor as long as it’s caching the memory Since I don’t have +64GB RAM.

True, but remember, World Composition is not a feature to improve editor performance with very large maps. It’s a feature to improve game performance with very large maps. The opening map of the Kite Demo pretty much says it all - Don’t even attempt to open all the sub-levels if you have less than 24 GB of RAM.

Is there any way to prevent caching the memory in editor?

Still looking for answers! Help!

I’m not sitting in front of my UE machine right now, but there is an option buried somewhere that will turn on level streaming while you’re moving around in the editor. I don’t know if that mechanism turns off the caching, though.