| Ideas to reduce memory usage [message #1017194] |
Sun, 10 March 2013 23:00  |
Luke V Messages: 1 Registered: January 2013 |
Junior Member |
|
|
I'm using Sapphire to facilitate an XML entry for a design description and documentation format. The XML schema is rather complex (has many levels of hierarchy and is composed of multiple files). The schema comes from an standards committee and I cannot modify it for simplification.
I have a sapphire form/model put together and it works well for smaller xml files (< 256K). However as the files get larger, the load time grows and the memory usage starts to balloon. For a larger xml file (1-2MB), the load time opening the first form is a minute or two and eclipse's memory usage creeps into the 1200MB to 1500MB range. This tends to make eclipse less than responsive (even on a recent desktop machine with 12GB of RAM) and decreases the editor's usefulness. Sapphire 0.5x series would crash the JVM with the larger files. Sapphire 0.6 eventually loads, but is very slow. I've tried all sorts of JVM configuration tweaks, 1.6, 1.7, Hotspot, OpenJDK, and both Eclipse Indigo and Juno without any luck.
I've tried analyzing the issue a bit with the various memory profiler tools. From an initial look, it seemed that much of the utilization was due to creating a new service object for each node in the design. One quick idea was to try and figure out how to share a service object (or have a default one) for nodes that didn't customize the service at all. However, this seemed to be a bit of work (especially without a good working knowledge of Sapphire's internals).
Does anyone have an additional insight or ideas of how to reduce memory usage on designs with large numbers of model nodes?
|
|
|
|
|
| Re: Ideas to reduce memory usage [message #1018315 is a reply to message #1018088] |
Wed, 13 March 2013 11:55  |
Konstantin Komissarchik Messages: 769 Registered: July 2009 |
Senior Member |
|
|
I fixed a number of performance issues for the 0.6 release using a combination of two techniques. I am sure more cases of both are still present.
1. Used a heap analyzer (such as Eclipse MAT) to look for lingering objects or too many objects of particular type. Memory leaks is the most likely culprit of high memory usage.
2. Used the trace facility in the event system to identify cases where too many events were generated and processed. This is the most likely culprit of slow editor startup. See ListenerContext.TRACE and Event.TRACE_SOURCE_STACK_DEPTH. This analysis is best performed with a very small editor and a very small model instance.
- Konstantin
|
|
|
Powered by
FUDForum. Page generated in 0.04004 seconds