Print at Dec 18, 2025, 4:34:04 PM View all posts in this thread on one page
Posted by rohitverma at Jan 15, 2012, 12:07:18 AM
How to reduce memory utilization of sweethome3d
Hi Emanuelle,

First of all a million thanks for making such a beautiful software..
Thanks a lot...

On my machine a 300MB sh3d file is using 2.3GB memory.

I wish to understand what causes so much memory utilization.

I investigated ObjLoader.createScene() method and found that each
scene object takes only few KBs of memory whereas in windows task manager the memory increases in Mega Bytes.

Is there any architecture document for SweetHome3d or some flow diagram of exactly how code flows when we load a model.

please help me as i wish to understand things better.

Regards,
rohit

Posted by Sajmmon at Jan 15, 2012, 12:39:36 AM
Re: How to reduce memory utilization of sweethome3d
It sounds as if you needed a profiling tool for your IDE.
If you use Eclipse, the following website is a good starting point:
http://www.eclipse.org/tptp/home/documents/tu.../profilingexample_32.html

Posted by rohitverma at Jan 15, 2012, 6:28:18 AM
Re: How to reduce memory utilization of sweethome3d
thanks sajmmon ..i will check the profiler...

however i wish to know that is java3d that consumes so much memory or we can still improve the code to consume less memory..

anyway i shall check the code myself and try to find some possible areas of improvement if any....

thanks again

regards,
rohit

Posted by Puybaret at Jan 15, 2012, 3:59:36 PM
Re: How to reduce memory utilization of sweethome3d
rohit, you can use visualvm (included with recent JDKs as the jvisualvm command). I regularly check possible memory leaks and perfomances issues in Sweet Home 3D with this tool. If you find some places where memory can be saved without breaking the few caches I programmed, don't hesitate to report it.
Nevertheless, 300 MB for a sh3d file, even uncompressed, is already big! You should check if the models you imported don't use too large textures.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by rohitverma at Jan 29, 2012, 7:32:54 AM
Re: How to reduce memory utilization of sweethome3d
thank you very much emmanuel sir...

I investigated a lot using visualvm but couldn't find any serious memory issue...

My observations:

I noted that for my model of 250MB :)) , visualVM showed JVM memory utilization of 550 MB (almost double) which is ok for me,..but the Java process in windows task manager showed memory utilization of 1200 to 2000 MB....(i think we cannot do much with how java process is handled by operating system)..


High regards,
rohit

Posted by Puybaret at Jan 29, 2012, 8:54:50 AM
Re: How to reduce memory utilization of sweethome3d
Maybe the 550 MB don't take into account all the OpenGL data or images data?

Thank you for your report. I'm glad to see you didn't find issues. smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator