OK, Eric. What I'm finding is that the applet was never thoroughly tested for memory leaks the way you are doing now. This is what it takes -- I'm so glad you are willing to put in the time to help us out here. Very satisfying to find these bugs. I just found another one relating to consoles. Now I'm finding that ch_comp repeatedly loads and switches between views with very little overhead. Just 16-20 Mb at all times, even with three applets running. If you can reproduce that, it's a very good sign that we are making progress.
http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11_5.zip is what you want again. Bob Eric Martz wrote: >At 2/6/08, you wrote: > > >>Eric, I found the memory leak. >> >> > >Dear Bob, > > >HOWEVER, I think there is still one big memory leak related to >isosurfaces. Chapter 2, view 2, which loads a .iso file, and then >calculates a separate cavity isosurface, raises total memory to 71 >Mb. > That makes sense. (1) you are introducing new code. (2) you are creating a translucent antialiased surface. Since you are probably running a fairly large screen size, (2) is a very large hit. So 71 sounds right to me. (On my machine it goes to 58.) >That is OK, but when you go back and forth between views 1 and 2 >(in chapter 2, waiting for the movie in view 2 to finish each time), >total memory quickly goes to max (_memory second value 99.9). Then, >when you go to the contents and other simpler chapters (replacing the >html and jmol completely), it stays high, in the 70's or 80's. >Obviously some memory related to the isosurfaces, or isosurfaces >combined with delays, was not released. > > > I think I may have fixed that. >ALSO, zap zap still doesn't reduce total memory in JTAT (may increase >it, e.g. from 18 to 28). And it doesn't clear out the 60-70 megs >after chapter 2 view 2. In Safari, at chapter 2, view 2, at 75 Mb, >zap zap raises total memory to 99.9 Mb. After this, reloading chapter >2 fails to load the PDB file. > > > please specify when you are using zap. Zap does do a garbage collection, but obviously what you are seeing is some sort of memory leak. I've checked, and zap is definitely finalizing all the objects, which means they are completely removed from memory. I am not seeing those climbs. But remember, going back to view 1 SHOULD maintain a higher memory load. >From "isosurface list" I see: 1 id:asurf; model:1.1; vertices:28414; polygons:56412; visible:false; title:isosurface asurf "../molecules4all/2hu4_a.iso" nofill mesh; 2 id:cavsurf; model:1.1; vertices:2624; polygons:5144; visible:false; title:isosurface cavsurf minset 250 POCKET cavity 1.2 5; When I do isosurface; isosurface delete I see the memory go back down to 23 Mb, so that's pretty decent. >Safari on OS 10.5: 71 Mb after chapter 2, view 2, but dropped to 31 >upon entering chapter 4, then to 25 as I went through those >multi-jmol comparisions. Continuing, molecule failed to load at >contents after chapter 6. Simple reload cured the problem, memory at >29. Able to complete tutorial without further memory climb. So Safari >is usable with an occasional reload (similar to the previous jmol). >Zap zap is poison! > > > When you say "zap zap" what are you talking about? I don't know, but zap should be totally benign. It's invoked always just before file loading, and it does clear out all the objects. >WinXP Firefox: Going into each chapter in order (initial view only, >not clicking additional view buttons except in chapter 4, multiple >jmol comparisons), and then back to contents between each chapter >(skipping chapter 2 view 2) gradually increased total memory from 20 >to 55 Mb. A zap zap then raised it to 75 Mb. Going through the >tutorial again then raised it to 92. So there is still some climbing >(polling was off!). But it is usable now. I was able to go through >the entire tutorial a 3rd time, with total memory at 99.9, with all >molecular views displaying and no browser crash. > > > On all your tests, make sure polling is off -- in config2.js, not just turning it off after it has run for a while. You need to add that bit of code I showed you. It is so much better. I am convinced that any polling of the applet is just asking for trouble. >Firefox on OS 10.5: As I went through the Demo tutorial, memory >gradually increased to 48 Mb, then dropped to 17, climbed again to >50. Zap zap increased it to 67. In a new session, chapter 2 view 2 >raised total memory to 67. Alternating views 1 and 2 three times did >not increase memory further. Zap zap did not change the memory. >Continuing on to other simpler chapters, memory spontaneously dropped >gradually to 31. Conclusion: Mac Firefox is MUCH MORE USABLE with >Jmol 11.5.5_dev. > > > I can't reproduce the zap-zap business, at least not with what I have now. >Thanks also for the syncCallback. I haven't implemented it yet in >JTAT, but it is a great option to have. I'll certainly implement it >if I see any funny business related to polling, but so far (at 1 >second intervals) I haven't seen anything that worries me. Most of my >memory tests have been done with polling disabled, so it hasn't been >a factor in the results. > > > syncCallback works great. >The on-line JTAT Demo (http://bioinformatics.org/jtat-tutorials) has >been updated to use Jmol 11.5.5_dev. Polling is disabled, and that is >announced in red at the top of each chapter. Automatic zap zap is >also disabled, but the manual ZZ link remains at the lower right for testing. > > > Tell me if you continue to have problems with zap. That makes no sense. >------------------------------------------------------------------------- >This SF.net email is sponsored by: Microsoft >Defy all challenges. Microsoft(R) Visual Studio 2008. >http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >_______________________________________________ >Jmol-users mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Professor 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 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

