Page 1 of 1

EditorComponent Optimization

Posted: Tue Feb 06, 2018 8:40 pm
by Johann
Hi everyone,

I am using Oxygen SDK (version 18). My application contains tabs and each tab is an EditorComponentProvider. The first tab takes a long time to open then the following tabs are faster to open.
I tried to make some tests in the AuthorComponentSample and I noticed that the first call of factory.createEditorComponentProvider(...) is very slower than the following ones.
In the same way, the first call of editorComponent.load(...) is slower than the following ones. (with the same document)

Am I right on that behavior ?

How can I optimize the first opening to be as faster as the following ones ?

Thanks for your help,

Johann

Re: EditorComponent Optimization

Posted: Tue Feb 06, 2018 8:56 pm
by Radu
Hi Johann,

Are all the component JAR libraries on the local drive or is it started using JavaWebstart?
It's expectable that on the first opened tab there is a longer delay (as all the classes are loaded) but there should be not such a long delay.
By "long time" what do you mean? How many seconds?
You should check if the component tries to access any web resource, maybe use a sniffer for this. If it does, usually it goes after some schema which is associated to the XML so using an XML catalog to resolve the schema reference on disk will fix this problem.
Also in such cases we usually use the JProfiler application to see where the delay occurs. Maybe you could try the same.

Regards,
Radu

Re: EditorComponent Optimization

Posted: Wed Feb 07, 2018 11:14 am
by Johann
Hi Radu,

The JAR libraries are on the local dirve.
In fact, I know that when I load a document which requires some webresources it can take a longer delay the first time to put these resources in a cache.
But, without loading a document, without framework, the call of factory.createEditorComponentProvider(...) takes about 2~3 seconds the first time and then only a few ms for the following calls. The users clearly feel this difference when they open several tabs on the application.

So, maybe, have I to preload the classes ?

I will try to optimize the document loading by checking web resources loaded and using some profilers.

Regards,

Johann

Re: EditorComponent Optimization

Posted: Wed Feb 07, 2018 11:30 pm
by Radu
Hi Johann,

2-3 seconds for the first call to the method which creates the component is expectable and indeed is probably connected to class loading.
So maybe indeed you could try to issue a call to the method right after calling the factory.init() method to force load all classes.

Regards,
Radu