Hello all.
My first question about build memory allocation:
I have many atlases with 4096*4096 dimentions(about 40). For good work Editor 2 I need add startup argument -Xmx4g(in last time -Xmx6g) for build my project, because defaulted allocated 2GB not enough for build. Yeah build process allocated around 6GB RAM it not joke. After end build process all allocated memory not return to OS and OS lagged and slow
I investigated problem(investigated with jconsole) and found out what Java garbage collector not immediatelly flush garbage after build(for my project it about 3GB RAM if needed I can make screenshots). If I use forced garbage collector garbage flush immediatelly, but allocated memory not return to OS.
I found two methods for drop not used memory:
- Start any other application with huge memory usage(Defold game bundle for example) for displacement memory
- In jconsole make heapDump (I think it work as method 1)
Anyone have thoughts for resolve problem?
My second question about build process:
If I right understand build process - Editor make compiled textures from atlases and load every atlas in memory this process allocated huge volume of memory, but every atlas saved to disk for what load all atlases to memory and not disposed saved atlas from memory?
And last question
Build process compile every png file and atlas to texture. What is the purpose of this? Thus, doubling the use of both disk space and memory on the build? I mean atlas containts same png files what was compile early