teneo - Performance penalty for larger models in HibernateResource [message #597157] |
Tue, 19 December 2006 23:14 |
Andre Pareis Messages: 113 Registered: July 2009 |
Senior Member |
|
|
Hi Martin,
I'm trying to load a large model into a tree based editor (using a
HibernateResource). I got the impression that the performance drop
over-proportionally with the model size.
The tree that shows up consists of the following hierarchy:
children per node: 1->580->120
total #objects per hierarchy level: 1->580->70,000
I am having problems already when the tree expands down to level 1 (the 580),
that is because the editor must determine number of children in order to decide
whether or not display the expansion icon or not.
While I was waiting for my tree to be displayed I monitored java and the running
mysql and figured, that the DB was mostly idle but java was on full load for
several minutes.
I have run the profiler and found that these two stack frames count for roughly
about 35% of the CPU:
TRACE 301131:
java.util.ArrayList.indexOf(ArrayList.java:219)
java.util.ArrayList.contains(ArrayList.java:201)
org.eclipse.emf.teneo.resource.StoreResource.attachedHelper( StoreResource.java:444)
org.eclipse.emf.teneo.resource.StoreResource.attached(StoreR esource.java:421)
TRACE 301145:
java.util.ArrayList.indexOf(ArrayList.java:220)
java.util.ArrayList.contains(ArrayList.java:201)
org.eclipse.emf.teneo.resource.StoreResource.attachedHelper( StoreResource.java:444)
org.eclipse.emf.teneo.resource.StoreResource.attached(StoreR esource.java:421)
CPU SAMPLES BEGIN (total = 101885) Tue Dec 19 23:43:27 2006
rank self accum count trace method
1 49.85% 49.85% 50789 300545 java.net.PlainSocketImpl.socketAccept
2 19.36% 69.21% 19728 301131 java.util.ArrayList.indexOf
3 16.07% 85.29% 16377 301145 java.util.ArrayList.indexOf
4 4.91% 90.20% 5004 301047 org.eclipse.swt.internal.win32.OS.WaitMessage
Both stack frames stem from the same line of code in StoreResource:
StoreResource.java:444:
if (newEObjects.contains(eObject) || loadedEObjects.contains(eObject))
I know that the checks are necessary but may be the ArrayLists can be replaced
by some hash based collection or additionally index for this existence check?
Regards
Andre
|
|
|
Powered by
FUDForum. Page generated in 0.04031 seconds