Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsMemory leaks in Sirius?
https://www.eclipse.org/forums/index.php/mv/msg/1088581/1771830/#msg_1771830
I use Xtext integrate with Sirius to test my model. I found a serious problem: each time i edit my model in Xtext editor, and triggers Sirius to reload model by saving model in Xtext editor, the total memory of my eclipse will be increased.
I use MAT (Memory Analyzer) to analyse the process, and it report 3 Suspects:
Problem Suspect 1:
One instance of "org.eclipse.core.commands.operations.DefaultOperationHistory" loaded by "org.eclipse.core.commands" occupies 65,834,888 (11.91%) bytes. The memory is accumulated in one instance of "org.eclipse.sirius.diagram.ui.internal.edit.parts.DDiagramEditPart" loaded by "org.eclipse.sirius.diagram.ui".
Problem Suspect 2:
One instance of "org.eclipse.emf.workspace.EMFCommandOperation" loaded by "org.eclipse.emf.workspace" occupies 61,916,472 (11.20%) bytes. The memory is accumulated in one instance of "org.eclipse.sirius.diagram.ui.internal.edit.parts.DDiagramEditPart" loaded by "org.eclipse.sirius.diagram.ui".
Problem Suspect 3:
410 instances of "org.eclipse.sirius.diagram.ui.tools.api.figure.SVGWorkspaceImageFigure", loaded by "org.eclipse.sirius.diagram.ui" occupy 243,685,336 (44.10%) bytes.
From suspect 3, i can make sure there must be memory leaks, because i only have 100 elements in my model, there should only have 100 SVGWorkspaceImageFigure instance in memory.
Now the problem is how to fix this issue?
My test enviroment:
Sirius (4.1.3) + Xtext (2.10.0) + Eclipse Neon.3 (4.6.3)]]>mind calm2017-08-31T07:57:27-00:00Re: Memory leaks in Sirius?
https://www.eclipse.org/forums/index.php/mv/msg/1088581/1771887/#msg_1771887
Thank you for your analysis. Effectively the SVGWorkspaceImageFigure memory print is particularly significant.
We will look at it. I bet we should reproduce it easily with a Sirius modeling project just making a blank modification in the aird file+save with an external editor. Could you test it with yours?
Just a trivial question: I guess your result analysis does not rely on the fact that the garbage collector had passed or not. It is a real leak and not a memory that could vanish with a garbage collector . Right?
Regards
Laurent
]]>Laurent Fasani2017-08-31T16:13:28-00:00Re: Memory leaks in Sirius?
https://www.eclipse.org/forums/index.php/mv/msg/1088581/1771910/#msg_1771910
I tested "making a blank modification in the aird file+save with an external editor", and I use "jvisualvm" to take snapshot of the eclipse before and after blank modification of aird file, before take snapshot i did garbage collection. And i compare the two snapshots, it shows the allocated objects of SVG*** will be increased, as show blow.