Good to have that data, Jonathan.

On Tue, Jan 22, 2013 at 8:35 PM, Gutow, Jonathan H <gu...@uwosh.edu> wrote:

> Everybody,
>
> Thanks for the comments.  Here's what I've learned with further testing in
> MacOS X.  I'll get to Linux next (although, I'm less worried there as
> support for Java is more robust).
> 1) JSmol in Firefox can read binary files without a server assist.  Note,
> I still get a not compatible popup in FireFox occasionally. Is that really
> true?
>

this is from what, the browser check? Not true.


> 2) Chrome can also load binary files, but for some reason does not default
> directly to JSmol, despite the fact that it is only a 32 bit program so
> cannot use the latest 64 bit Java plugins.  In Chrome I get the yellow, you
> do not have Java installed panel.  My temporary fix is to add a link to the
> message that reloads the page with a ?USE=HTML5 appended to the URL and use
> that to reset the options for JSmol.
>

Ah, we need to work on this. The new methods of disabling Java are not
testable in JavaScript for some reason. We will have to have a tiny
"bootstrap" applet that loads first and does only one thing -- reports back
that it is functioning -- so that JSmol can then do a proper determination
if JAVA is used as an option.



> 3) Safari cannot load binary files without a server assist in JSmol.
>  Converting all files to text allows it to work locally.  On a server I
> think it works fine because I left it calling the St. Olaf server for help.
>  I find this really amusing since Apple has been in the lead when pushing
> to get rid of Java in the browser environment, yet their javascript is
> clearly less capable.
>




>
> Another note.  FF 18 seems to have pretty fast javascript.  It handles
> JSmol pages better than most of the other browsers.
>
>
certainly my experience. I want to do some more fundamental testing,
particularly with Mac/Safari and iPad/Safari to see if certain functions
run slowly. We were able to do some huge optimizations back in September
when we were optimizing the Jmol Java code for compiling into JavaScript.
All it takes is, for example,

x = "" + ""

to be slow in Safari, or "Int32Array" to be slower than "Array" for there
to be an immense performance hit. For example, it used to be true that

var d = new Date(); var x = ""; for (var i = 0; i < 1000000; i++) x +=
"x";(new Date()-d)

was a really BAD idea in JavaScript. But -- surprise, surprise -- now it is
faster than

var x = []; for (var i = 0; i < 1000000;i++)x.push("x'");x.join("")

by about 25%. That sort of thing can really slow you down. You can test
that with:

var d = new Date(); var x = ""; for (var i = 0; i < 1000000; i++) x +=
"x";(new Date())-d

and

var d = new Date(); var x = []; for (var i = 0; i <
1000000;i++)x.push("x'");x.join("");(new Date())-d

at a developer console. Tell me what you find. On my laptop that reports
(milliseconds):

353

and

462

Might not seem like much, but it's things like that that can hurt
performance. Or try this, which tests Int32Array, which is HUGELY used in
Jmol. The following test almost makes me want to go back to Array:

var d = new Date(); var x = new Int32Array(1); for (var i = 0; i < 1000000;
i++) x[0]++;(new Date())-d


var d = new Date(); var x = [0]; for (var i = 0; i < 1000000; i++)
x[0]++;(new Date())-d

giving, on my machine, 486 and 586 ms. Especially poor performance there
would severely impact protein modeling.




> Anyway, I think I may just ignore Safari for local stuff.  Things may
> change by the time JSmol is completely settled.  I guess I can just
> generate .pngj files as I originally intended.
>

I think as long as people know the limitations, we should be alright in
this regard. That's more of a developer aspect, I think.

Bob


>
> Jonathan
> On Jan 22, 2013, at 8:13 AM, Angel Herráez wrote:
>
> > Jonathan, there was thread about reading binary files into JSmol.
> > What are your filenames? Have you tried to include .bin in the
> > filename? That should force JSmol to think it is binary
> >
> > e,g,   caffeine.bin.jmol
> >
> >
> >
> ------------------------------------------------------------------------------
> > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> > MVPs and experts. ON SALE this month only -- learn more at:
> > http://p.sf.net/sfu/learnnow-d2d
> > _______________________________________________
> > Jmol-developers mailing list
> > Jmol-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
>                         Dr. Jonathan H. Gutow
> Chemistry Department                                 gu...@uwosh.edu
> UW-Oshkosh                                           Office:920-424-1326
> 800 Algoma Boulevard                                 FAX:920-424-2042
> Oshkosh, WI 54901
>                 http://www.uwosh.edu/facstaff/gutow/
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
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
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to