Jmol Memory Tests
by Eric Martz.
In Firefox (Win or Mac), progressing through the molecular views of the
JTAT Demo Tutorial
causes java memory
use to climb until Firefox is unable to display
the molecule, or "vaporizes" (crash by sudden disappearance of the browser).
JTAT employs four kinds of changes between molecular views:
- New script (same molecule already loaded). This does not seem to increase
memory use.
- Load different molecule and apply new script.
- New HTML page with new Jmol in same browser window.
- New Jmol(s) into existing division (via innerHTML; only when number
of Jmols changes between views).
Method 1 above never causes memory use to increase. The tests below were
designed to detect which method (2-4) causes memory use to increase, but
none of these tests do so. Why memory use climbs in JTAT remains unclear.
The tests did reveal one surprise: two consecutive zaps reduces java memory
use much more than does one zap.
Tests
Total java memory in use is reported as the second
number (after the slash) returned by jmolEvaluate("_memory").
Download these tests. (Open index.htm in the browser.)