This is an early snapshot from an ongoing gem run, same as the previous CPU profiling. At this point only 34MB of objects were live.

This is with my ObjectSpace impl in place. I will run another profile without it to see how it changes.

By method...
- ObjectSpace is a BIG winner in the memory department. At the time I pulled off a snapshot, ObjectSpace.add was responsible for allocating 24% of all memory in use.
- Second place goes to SourcePosition.getPosition comes in second, being responsible for 6% of memory usage.
- DefaultRubyParser.yyparse is third with 4%. There are a number of other parse-related methods within and without this chain of 1-2% each. Parsing and building the AST eats up a substantial chunk of memory which would be partially eliminated by pre-parsing and completely eliminated by compilation.

By type...
- char[] accounted for 32% of memory in use Consider that all strings in Ruby could be byte[] and we could cut memory usage in this scenario by 16% with a non-char[] RubyString.
- ObjectSpace$WeakReferenceListNode instances took up another 22% of memory. ObjectSpace is just a bitch, no matter how you slice it.
- SourcePosition instances took up 7%

--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to