|
Re: Performance problem: how to speed up loadPackage() in EPackageImpl class [message #1445933 is a reply to message #1445734] |
Thu, 16 October 2014 05:24 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Tamar,
Comments below.
On 15/10/2014 11:45 PM, Tamar Cohen wrote:
> Hi all--
>
> I have finally gotten around to some detailed performance analysis of
> my EMF KML code, and discovered that during initialization, there is a
> roughly 550ms hit, and I've narrowed it down to a series of 150 -
> 200ms hits that are caused by this line in the generated code:
>
> resource.load(null);
This is loading the serialized *.ecore. This may cause all dependent
models to load as well, and you'll generally find (I expect) that the
overall cost is dominated by class loader costs, not by the XMI
processing itself. If you change the GenPackage's Initialize by
Loading to false, does the code compile or is some byte code too big? I
suspect that really won't make the performance significantly better
though...
>
> Is there anything I can do to make this more efficient? I know this
> is a vague question as I'm not including my complex EMF model
> definitions, but is there some area that I can look at? or should
> these be initialized in plugin activation in a separate thread so that
> the hit won't come when the user tries to load a KML file? Maybe
> that's a good workaround ...
My instincts tell me this sounds like a class loader issue. This is
really the dominant cost for Eclipse startup in general and there's
pretty much nothing that can be done except load fewer classes, or try
to come up visually as quickly as possible and then load classes on
other threads so they're ready when the user is ready. You'll see for
example, jobs that initialize JDT, which take very long..
>
> thanks
> Tamar
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03486 seconds