Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Memory leaks in Sirius?
Memory leaks in Sirius? [message #1771830] Thu, 31 August 2017 07:57 Go to next message
mind calm is currently offline mind calmFriend
Messages: 57
Registered: July 2017
Member
HI,
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)


Best regards!

by Keep Mind Calm
Re: Memory leaks in Sirius? [message #1771887 is a reply to message #1771830] Thu, 31 August 2017 16:13 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 166
Registered: October 2014
Senior Member
Hi

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?

Anyway, I invite you to create a bugzilla ideally with a simple reproducible scenario: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sirius

Regards
Laurent


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Memory leaks in Sirius? [message #1771910 is a reply to message #1771887] Fri, 01 September 2017 02:39 Go to previous message
mind calm is currently offline mind calmFriend
Messages: 57
Registered: July 2017
Member
Hi, Laurent
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.
index.php/fa/30559/0/

I report this on bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=521718.


Best regards!

by Keep Mind Calm

[Updated on: Fri, 01 September 2017 05:56]

Report message to a moderator

Previous Topic:Hide node or container by default
Next Topic:Closing a session without a write transaction
Goto Forum:
  


Current Time: Fri Jun 05 11:07:39 GMT 2020

Powered by FUDForum. Page generated in 0.01464 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top