Loading model slowly [message #1769034] |
Wed, 26 July 2017 03:58 |
zhang ph Messages: 43 Registered: March 2017 |
Member |
|
|
Hi,
Today I create an modeling project(File->New->modeling project), then in the project i create a model(model.A) and copy another model(model.B, about 8.5MB, EObjects=85000,EReferences=140000) into this project(Note: i have embedded the two corresponding meta-model into the eclipse). Then load the model.B into model.A by Load Resource..., then the eclipse is blocked and until 30 minutes later, it become active. duiring the blocked period, i open the Java VisualVM,i find when the heap size reached 40GB in the Monitor window, it will reduce to 0 sharply, this situation is repeated continuously. Below is the information in the overview window of Java VisualVM:
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms64G
-Xmx128G
Then i use bigger model to verify this issue, the situation is as the same to before and it need more time to become active. So could help me to analyze this situation and give me your suggestion?
Hope for your reply!
|
|
|
Re: Loading model slowly [message #1769048 is a reply to message #1769034] |
Wed, 26 July 2017 05:31 |
Ed Merks Messages: 33148 Registered: July 2009 |
Senior Member |
|
|
The best way to analyze this situation is to use a profiler such as YourKit. A poor man's approach I sometimes use is "sampling" with the debugger. Just run under debug control, and pause the thread doing the work or pause the whole process. It sounds like in this case, all the work is being done on the main thread, so that's easier to sample. Let in run, pause it, look at what's on the stack. Do that repeatedly. Then you'll start to see where it's spending most of it's time. If it's spending a lot of time in org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObjectByID(String) trying using org.eclipse.emf.ecore.resource.impl.ResourceImpl.setIntrinsicIDToEObjectMap(Map<String, EObject>) and org.eclipse.emf.ecore.xmi.XMLResource.OPTION_DEFER_IDREF_RESOLUTION for as a load option; both you can set in the your resource factory.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03020 seconds