From: Leo F. <leo...@ne...> - 2012-01-25 12:09:16
|
Hi Tim, The Netbeans profiler is actually quite powerful and easy to use. There is even a OO-query (SQL like) language to analyse the heap dump (!!!) Thanks for the suggestion - you were right: I managed to reduce the ArrayList/Object[] memory consumption from 24% to 16% (e.g., in real terms from 105MB to 80MB - some good results as well). And the changes weren't that significant: mostly at TermImpl and GNast templates for corejava + a few spots here and there. I am quite happy with the results, and the usability within Eclipse is now much much better / smooth for some of the larger specs I am handling (e.g., bare in mind I also had in memory the proof state and VCG data /info )!!! Thanks for suggesting this :-) And others, please let me know your experiences - if it improve / deteriorate etc.... Best, Leo On 25 Jan 2012, at 09:00, Tim Miller wrote: > Hi Leo, > > Thanks for looking into all of this. It is some useful analysis. > > I have tried to use the getAnns() method without creating new references > to it. I violate this only to improve readability. I don't think it is > causing to many problems though because the annotation lists persist in > memory as long as the AST exists, so references to these lists elsewhere > won't have much of an effect. > > One possibility to help with reducing the annotation list memory > consumption is to modify the gnast code such that the annotation list > for each term is initialised to null, and then only created the first > time the getAnns() method is called. I'd wager that for a lot of terms, > it is never called. > > And regarding your previous email, I definitely think a 2-3% increase in > CPU use is a good trade off for halving memory usage. In the parser and > typechecker, we can always wait a bit longer for the result, but once > we're out of memory, there's nowhere to go! > > Cheers, > Tim > > On 25/01/12 17:47, Leo Freitas wrote: >> Hi guys, >> >> I think I found another source of some of the retained instances that seem to have weird behaviour. >> >> Term has a List<Object> getAnns() method, which exposes information like LocAnn and TypeAnn and others. >> It's called in 1112 places across 17 CZT sub-projects: that exposes the ArrayList / Object[] for retention from those >> that use the result or keep it in maps or the like. >> >> Having said that, I couldn't find a place of misuse in the scattered references that I searched for (e.g., this might >> be just another red herring or a key point for modification/memory-performance-improvement)..... >> >> thoughts / comments / suggestions ? >> >> Leo >> ------------------------------------------------------------------------------ >> Keep Your Developer Skills Current with LearnDevNow! >> The most comprehensive online learning library for Microsoft developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-d2d >> _______________________________________________ >> CZT-Devel mailing list >> CZT...@li... >> https://lists.sourceforge.net/lists/listinfo/czt-devel >> > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > CZT-Devel mailing list > CZT...@li... > https://lists.sourceforge.net/lists/listinfo/czt-devel |