JSmol/Rotation Speeds: Difference between revisions

Eric Martz (talk | contribs)
No edit summary
Eric Martz (talk | contribs)
 
(104 intermediate revisions by the same user not shown)
Line 2: Line 2:


Performance of JSmol depends on the underlying performance of the javascript in the browser being used. With smaller macromolecules (under about 2,000 atoms) performance is generally good in all browsers except Internet Explorer. With larger macromolecules, the choice of browser becomes more important for optimal performance.
Performance of JSmol depends on the underlying performance of the javascript in the browser being used. With smaller macromolecules (under about 2,000 atoms) performance is generally good in all browsers except Internet Explorer. With larger macromolecules, the choice of browser becomes more important for optimal performance.
Browser javascript performance varies as new browser versions are released. Below are rotation speed results obtained at various times.
<br>See also [https://en.wikipedia.org/wiki/Usage_share_of_web_browsers Browser popularity worldwide].


==Conclusions==
==Conclusions==
===Update April, 2021===
Versions current in April, 2021, of the '''Chrome, Edge, Firefox and Opera''' web browsers all seem equally good for JSmol. '''Safari''' is acceptable, but rotation of solid (spacefilled) renderings is substantially slower/choppier than the others, especially at high zoom levels.


'''Firefox''' outperforms all other popular browsers for smoothness and speed of rotation, and is therefore the '''recommended''' browser for websites that use JSmol such as Proteopedia and [[FirstGlance in Jmol]].
===Update January 2019===
Differences from July, 2017:
*Chrome is now faster than Firefox; slightly faster on Mac but 2-fold faster on Windows.
*Opera now performs nearly as well as Chrome (in both Windows and macOS).
*Safari is now 5X slower than Chrome for spacefilled rendering. This is true in OS 10.10 and 10.14.
As before:
*Waterfox is comparable to Firefox for JSmol, and very fast with Java.
*Edge is about 5X slower than Chrome.
*Internet Explorer is 10X to 30X slower than Chrome.
<center>TEST RESULTS
<!-- to center a table: style="margin: 1em auto 1em auto;" -->
{| class="wikitable" style="margin: 1em auto 1em auto;"
|-
! colspan="8" | Frames/Second for spinning in cartoon, <u>spacefill</u>.
|-
! Operating System
! Chrome
! Edge
! Firefox
! Internet Explorer 11
! Opera
! Safari
! Waterfox
|-
| Windows 10
| 3.4, <u>3.0</u>
| <font color="red">0.5, <u>0.7</u></font>
| <font color="magenta">1.5</font>, <u>3.4</u>
| <font color="red">0.35, <u>0.1</u></font>
| 2.5, <u>4.2</u>
| n/a
| n/d
|-
| Mac OS 10.14 or 10.10
| 3.6, <u>3.6</u>
| n/a
| 2.3, <u>4.0</u>
| n/a
| 3.5, <u>3.7</u>
| 3.8, <font color="red"><u>0.7</u></font>
| 2.3, <u>~5.0</u><br><font color="#00a000">~7.0*, <u>~7.0*</u></font>
|}
"n/a": not available. "n/d": not determined.
<br>JSmol without Java. Data for December 30, 2018. <font color="red">Bad performance.</font> <font color="magenta">Poor performance.</font>
<br><font color="#00a000">* Running Jmol in Java, not JSmol. Tested only in OS 10.14.</font> [[Installing and enabling Java]].
<br>Methods same as [[#March 27, 2017|March, 2017]], except zoom for spacefill was 260%.
<br>Rendering quality was low (antialiasdisplay false).
</center>


'''Chrome, Edge''' and '''Opera''' rotate molecules in JSmol about half as smoothly as Firefox. That is, they generate about half the number of frames/second as Firefox, so their performance is two-fold slower.
====FirstGlance in Jmol====
Previously, this section reported that [[FirstGlance in Jmol]] version 2.74 (and several earlier versions) was very slow to load and display large RNA structures. This was due to a bug in FirstGlance that was fixed in [https://oca.weizmann.ac.il/oca-docs/fgij/versions.htm version 2.8 released May 29, 2019].


'''Internet Explorer 11''' gives '''unacceptably slow''' rotation of molecules in JSmol, with a performance about one-fifth that of Firefox.
==July, 2017==
Differences from March, 2017: none. From May, 2016: minor.


:<small>Historical note: In 2014, Chrome outperformed Firefox. Changes in Chrome in 2015 reduced its performance for rotating molecules in JSmol. In December, 2015, a change in Chrome (first in version 47) made it unable to rotate molecules in JSmol satisfactorily. As the mouse moved, the molecule remained fixed until the mouse movement stopped, whereupon the molecule jumped to the final position in one step. Bob Hanson was able to work around the change in Chrome with a modification to JSmol, but frames/second are still poorer than they were in Chrome in 2014.</small>
*Windows (JSmol, no Java):
**Firefox and Chrome perform similarly. (Cartoon rotation: Chrome outpeforms Firefox, about 2x more frames/second. Spacefill rotation: Firefox outperforms Chrome also about 2x.)
**Edge: NOT RECOMMENDED. Very sluggish. Spinning and rotation by mouse are very jerky.
**Internet Explorer: UNACCEPTABLE, extremely sluggish, with spining/rotation extremely slow and jerky.


==Data==
*Mac OS X (JSmol, no Java):
**Firefox performs best.
**Chrome: Performance very close to that of Firefox. Both spinning and rotation by mouse are a slightly jerkier than in Firefox (less than two-fold difference).
**Safari: Overall performance is good. Spinning and rotation by mouse are a little smoother than Firefox for cartoon rendering. For spacefill rendering, spinning was jerkier than Firefox by about three-fold.


Tests below were done in [[FirstGlance in Jmol]] in the default HTML5 mode, using [[7ahl]], a single model with 22,778 atoms (which puts it in the largest 5% of entries in the [[PDB]]). Tests were done in a browser window approximately 1,400 x 900 pixels on a late 2014 MacBook Pro (2.2 GHz Intel Core i7 with 1600 MHz DDR3 RAM).  With spinning on, the number of frames in 10 sec was counted and divided by 10 to get frames/second. Browsers were the versions current in December, 2015.
==March 27, 2017==
<!-- style="margin: 1em auto 1em auto;" -->
===JSmol (Javascript)===
All browsers were updated to the versions current at the time of testing (March, 2017). Tests below were done in [[FirstGlance in Jmol]] in the default HTML5/javascript mode. In order to slow down rotation to enable manual counting of frames/second, a large molecule was used: [[1g3i]], a single model with 45,528 atoms (which puts it in the largest ~2% of entries in the [[PDB]]). Tests were done in a browser window approximately 1,900 x 1000 pixels on a late 2014 MacBook Pro (2.2 GHz Intel Core i7 with 1600 MHz DDR3 RAM).  Windows 10 was a virtual machine (VMware) on the Mac, running at native speed on the Mac's Intel processor. For spinning, frames/second were determined at zoom 170%. For rotation by mouse, frames/second were determined at zoom 100%, cartoon rendering.
<!-- to center a table: style="margin: 1em auto 1em auto;" -->
:{| class="wikitable"  
:{| class="wikitable"  
|-
|-
! colspan="6" | Frames/Second in Cartoon, Spacefill
! colspan="6" | Frames/Second for spinning in cartoon, spacefill; for rotation by mouse in cartoon.<br>JSmol without Java. Data for March 27, 2017.
|-
|-
! Operating System
! Operating System
! Firefox
! Firefox
! Safari
! Chrome
! Internet Explorer 11
! Edge
|-
| Windows 10
| 3, 6; 3.4
| n/a
| 2, 2; 3.3
| 0.4, 0.14; 0.5
| 1.0, 1.3; 1.5
|-
| Mac OS 10.10.5
| 3, 6; 3.6
| 4, 1.7; 5
| 2, 4; 3
| n/a
| n/a
|}
"n/a": not available.
----
<table border="0" style="background-color:#d0d0d0;"><tr><td>
==Older Results==
Everything below is partially obsolete. It remains here only for historical reference.
In December, 2015:
*'''Firefox''' and '''Safari''' outperform all other popular browsers for smoothness and speed of rotation, and therefore are the '''recommended''' browsers for websites that use JSmol such as Proteopedia and [[FirstGlance in Jmol]].
*'''Chrome''' and '''Opera''' rotate molecules in JSmol about '''4-fold slower''' than Firefox (or Safari) for cartoon rendering, and almost 2-fold slower for spacefilled rendering. That is, they generate fewer frames/second, so rotation or spinning is less smooth or more jerky.
*'''Edge''' (the new browser in Windows 10)  is almost '''4-fold slower''' than Firefox for both cartoon and spacefilled renderings.
*'''Internet Explorer 11''' gives '''unacceptably slow''' rotation of molecules in JSmol, with a performance about '''9-fold slower''' than that of Firefox.
::<small>Historical note: In 2014, Chrome outperformed Firefox. Changes in Chrome in 2015 reduced its performance for rotating molecules in JSmol. In December, 2015, a change in Chrome (first in version 47) made it unable to rotate molecules in JSmol satisfactorily. As the mouse moved, the molecule remained fixed until the mouse movement stopped, whereupon the molecule jumped to the final position in one step. Bob Hanson was able to work around the change in Chrome with a modification to JSmol, but frames/second are still poorer than they were in Chrome in 2014.</small>
*The <font color="red">Jmol Java applet</font> is only 1.4-1.8 fold faster in Firefox, but 20-fold faster in Internet Explorer.
==Data (December, 2015)==
===JSmol (Javascript)===
Tests below were done in [[FirstGlance in Jmol]] in the default HTML5/javascript mode. In order to slow down rotation to enable manual counting of frames/second, a large molecule was used: [[1g3i]], a single model with 45,528 atoms (which puts it in the largest ~2% of entries in the [[PDB]]). Tests were done in a browser window approximately 1,900 x 1000 pixels on a late 2014 MacBook Pro (2.2 GHz Intel Core i7 with 1600 MHz DDR3 RAM).  Windows 10 was a virtual machine (VMware) on the Mac, running at native speed on the Mac's Intel processor. With spinning on, the number of frames in 10 or 20 sec was counted and used to calculate frames/second. Browsers were the versions current in December, 2015.
<!-- to center a table: style="margin: 1em auto 1em auto;" -->
:{| class="wikitable"
|-
! colspan="9" | Frames/Second in Cartoon, Spacefill<br>JSmol without Java
|-
! Operating System
! Firefox
! Safari
! Chrome
! Chrome
! Internet Explorer 11
! Internet Explorer 11
! Edge
! Edge
! Opera
! Opera
! Maxthon
! Torch*
|-
|-
| Windows 10
| Windows 10
|  
| 3.9, 4.3
|  
| n/a
| 1.2, 1.1
| 1.05, 2.7
| 2.6, 2,8
| 0.45, 0.45
| 3.0, 3.8
| 1.1, 1.25
| 1.0, 2.4
| 1.5, 2.5
| 1.6, 3.0
|-
|-
| Mac OS 10.10.5
| Mac OS 10.10.5
| &ge; 6, &ge; 6
| 4.2, 4.1
| 2, 4
| 4.0, 3.3
| 1.05, 2.95
| n/a
| n/a
| n/a
| (failed)
| 4.2, 3.5
| n/a
| n/a
|
|}
|}
"n/a": not available.
<br>
<nowiki>*</nowiki> Despite a [http://internet-browser-review.toptenreviews.com/ high review], Torch seems a rather iffy browser. It is [http://remove-browser-hijackers.com/torchbrowser-com/ accused of hijacking] and does not identify itself in navigator.userAgent.
===Jmol (Java applet)===
Because Java is so much faster than Javascript, the spinning was further slowed by clicking the "Zoom Larger" button in FirstGlance twice.
<br>(Torch does operate Java in Dec. 2015.)
:{| class="wikitable"
|-
! colspan="8" | Frames/Second in Cartoon<br>JSmol without Java - <font color="red">Jmol Java applet</font>
|-
! Operating System
! Firefox
! Safari
! Chrome
! Internet Explorer 11
! Edge
! Opera
| Maxthon
|-
| Windows 10
| 3.2, <font color="red">4.7</font>
| n/a
| No Java
| 0.3, <font color="red">~7</font>
| no Java
| n/d
| 0.2,
|-
| Mac OS 10.10.5
| 3.3, <font color="red">6</font>
| 3.0, <font color="red">~7</font>
| no Java
| n/a
| n/a
| (failed)
| No Java
|}
"n/a": not available. "n/d": not determined.
</td></tr></table>
==See Also==
*[[Jmol]]
*[[User:Eric Martz/JSmol Notes]]
* [https://blokt.com/guides/best-secure-browsers-for-private-browsing The Best Secure Browsers for Private Browsing in 2019]: Chrome gathers as much information about you as it can to send back to Google for marketing purposes. Firefox is not the product of a for-profit corporation, and does not gather such information. This article tells how to maximize your privacy while using Firefox.

Proteopedia Page Contributors and Editors (what is this?)Proteopedia Page Contributors and Editors (what is this?)

Eric Martz