Nicolas Vervelle wrote:

> Hi Bob and Miguel,
>
> I think that we should do something to speed up the applet loading.
> Splitting JmolApplet.jar was a good way of doing this, but I think the 
> splitting should be reviewed because currently all JmolAppletX.jar are 
> required for even the most basic stuff.
>
Absolutely. I did some work on this in relation to trying to create a 
"Jmol Lite". At that point I did a lot of weeding, so what is there now 
is pretty much the minimum overall.

> I have the impression that all the jars are loaded even when doing 
> nothing :
> - JmolApplet0.jar (13k) is the starting point. It contains 
> org.jmol.api and org.jmol.appletwrapper.
> - JmolApplet1.jar (69k) is required. It contains org.jmol.api, 
> org.jmol.applet, org.jmol.i18n, org.jmol.popup.
> - JmolApplet2.jar (55k) is preloaded because some javax.vecmath 
> classes are preloaded. It contains javax.vecmath.
> - JmolApplet3.jar (118k) is preloaded because some org.jmol.g3d 
> classes are preloaded. It contains org.jmol.g3d, org.jmol.quantum, 
> org.jmol.symmetry.
> - JmolApplet4.jar (158k) is preloaded because some general classes 
> from org.jmol.adapter.smarter are preloaded. It contains 
> org.jmol.adapter.smarter.
> - JmolApplet5.jar (59k) is loaded. It contains org.jmol.bspt, 
> org.jmol.smiles, org.jmol.util, org.jmol.vecmath.
> - JmolApplet6.jar (670k) is loaded. It contains org.jmol.viewer.
> (I think only JmolApplet_i18n.jar may be loaded only for non English 
> viewers, but I am not even sure)
>
No question that all these are loading. Not necessarily in that order. 
On my server I see the order:

0, 1, 5,2,3,4,6



> So, in fact, everything is downloaded before Jmol can really start.


right. That is what I observe.

> We could probably speed things up by organizing the JmolAppletX.jar 
> differently :
> - put some Java packages in separate jars (for example: 
> org.jmol.quantum and org.jmol.symmetry may be required only in some 
> situations, but currently they are always loaded because they are with 
> org.jmol.g3d).
> - split some Java packages in separate jars (currently all 
> org.jmol.viewer is in one huge jar, so everything has to be downloaded).
> We should try to make smaller coherent jars.
>
> What do you think ?
>
> I am going to Toulouse for probably the all week and won't have time 
> to work on everything
>
I think it would be great to get this checked out. The spreadsheet I 
used in creating JmolAppletLight.jar is at 
http://www.stolaf.edu/academics/chemapps/jmol/docs/misc/appletFiles.xls

It's just a crude attempt at quantifying what is essential and what sort 
of category it is in. It's a bit out of date, because I just did some 
refactoring, but it might give us some ideas. At least it quantifies 
what is there.

I did notice that with debug="off" JmolApplet.jar is reduced from 1.26 
Mb to 0.95 Mb. So that's significant right there.
I got the "Lite" version down to 700 K without removing debugging, so I 
suspect that would reduce to something like 550 K. So that's quite 
significant -- of course, there's not much there.... just a bare minimum 
of file readers, no rasmol classes, no dipoles, no draw, no surfaces, no 
popup menu, etc., etc.

I plan to offload some of isosurface into other classes, so that can get 
smaller and perhaps moved out of Viewer. But of course, we would have to 
finesse the class loading for the calculations so that loading 
isosurface doesn't automatically load the calculation classes.

Bob




> Nico



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to