Merge a memory leak defect from Sirius 6.0 to Sirius 4.1.3 [message #1796548] |
Tue, 16 October 2018 02:19 |
mind calm Messages: 57 Registered: July 2017 |
Member |
|
|
Hi,
Last year i report a memory leak problem on https://www.eclipse.org/forums/index.php/m/1771830/#msg_1771830 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=521718
I saw Sirius have fixed it at Sirius 6.0.0, now i want to merge the related codes from Sirius 6.0.0 to Sirius 4.1.3, which version i used in my platform.
I saw the commit on git, https://git.eclipse.org/r/#/c/112822/ and https://git.eclipse.org/r/#/c/123468/
Besides the junit project, there are two files changed, one is "plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/DDiagramEditorImpl.java", and another is "plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/DDiagramEditorSessionListenerDelegate.java".
Is that true merge these two file changes can fix the memory leak problem? or i need merge other file changes?
If my merge scope is correct, then there still have memory leak on delete project scenario.
My test steps are:
0. Click the "Garbage Collector" icon some times to get the stable heap size.
1. Import a project within a model
2. Create diagrams of this model
3. Open the diagrams
4. Delete the project
5. Repeat step 0 to step 4 for 5 or 10 times
6. Do step 0, to get the stable heap size.
You can see the stable heap size is growing.
Best regards!
by Keep Mind Calm
[Updated on: Tue, 16 October 2018 05:46] Report message to a moderator
|
|
|
|
|
Re: Merge a memory leak defect from Sirius 6.0 to Sirius 4.1.3 [message #1797579 is a reply to message #1796614] |
Fri, 02 November 2018 09:06 |
mind calm Messages: 57 Registered: July 2017 |
Member |
|
|
Hi, Pierre
I tested the eclipse photon with default Sirius version 6.0.0, I found the memory leak exist. And i update Sirius to 6.1.0, leak still exist.
As we know, there are 3 ways to create a diagram.
a) First is initialize all diagrams by select viewpoint (precondition: enable "Initialization" in odesign)
b) Second is "New Representation" menu on explorer tree viewer.
c) Third is "New"-> "Create ****** " menu on a diagram element (if this element can create a diagram).
In my test, test steps as below:
1) Create a empty modeling project
2) Copy a large model into the project. (large model is used for easily recognize the leak.)
3) Select viewpoint, this will initialize all diagrams.
4) Open a diagram
5) Right click a diagram element on the opened diagram, "New"-> "Create ****** " to create a new diagram.
6) Delete the project (delete project contents on disk).
7) Create a empty modeling project
8) Click the "Garbage Collector" icon some times to get the stable heap size.
9) Repeat step 2) to step 8) several times. You will see the heap size grows.
As my experience, execute GC after step 7) can release much more memory than step 6), maybe it is for undo/redo, I'm not sure.
Best regards!
by Keep Mind Calm
[Updated on: Fri, 02 November 2018 09:28] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02519 seconds