Jmol uses typed arrays when possible. Parsing of scripts is relatively slow. Rolf, if you want to give me something to try, I will be happy to play with it and see what I can learn.
On Wed, Dec 16, 2015 at 12:30 PM, Paul PILLOT <paulpil...@gmail.com> wrote: > Hi Rolf, > my experience in this area is not JSmol related, but when I had to deal > with big tables in javascript (for a multiple sequence alignment script, > aligning 2 sequences of 5000 signs, requires at least 1 table of 5000 rows > and 5000 columns), I noticed that : > - using integers only tables is fastest > - opting for one dimensional array instead of two dimensional didn’t make > a noticeable difference > - using typed arrays in some cases improved significantly the performance > ( see https://developer.mozilla.org/en/docs/Web/JavaScript/Typed_arrays ). > This was 2 years ago, and the browsers’ engine landscape can be quickly > moving... > When you parse your data from your TSV file, are the fields stored as text > ? > > My 2 cents, > Paul > > Le 16-12-2015 à 13:12, Rolf Huehne <rhue...@leibniz-fli.de> a écrit : > > Hi all, > > I am looking for some speedup tips for Jmol scripting in JSmol/HTML5. > > The speed difference between JSmol/Java and JSmol/HTML5 for graphical > operations like rotation and zooming seems to be about 10 times or less > in Firefox and Chrome (if you don't consider the recent rotation speed > problems in Chrome). > > Unfortunately the difference for Jmol scripting seems to be much higher > in my experience: about 50-70 times. > > If I load for example 3 TSV (tab separated value) format files with > overall about 34,000 lines, JSmol/Java needs about 26 seconds for > laoding and parsing the data and putting it into a multi-level hash > structure. JSmol/HTML5 needs about 1700 seconds instead. > > I already tried to write the final data structure into a file with > 'write VAR ...' and read it in again as a script (after adding a proper > variable assignment) but this already took in Java endlessly (I stopped > waiting after more than an hour...). > > Q: Does anyone have any other ideas that might speed up this process? > > Regards, > Rolf > > > -- > > Rolf Huehne > Postdoc > > Leibniz Institute on Aging - Fritz Lipmann Institute (FLI) > Beutenbergstrasse 11 > 07745 Jena, Germany > > Phone: +49 3641 65 6205 > Fax: +49 3641 65 6210 > E-Mail: rhue...@leibniz-fli.de > Website: http://www.leibniz-fli.de > > Scientific Director: Prof. Dr. K. Lenhard Rudolph > Head of Administration: Dr. Daniele Barthel > Chairman of Board of Trustees: Burkhard Zinner > > VAT No: DE 153 925 464 > Register of Associations: No. 230296, Amtsgericht Jena > Tax Number: 162/141/08228 > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Larson-Anderson Professor of Chemistry Chair, Department of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
_______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users