logo       

RE: memory profiling notes: msg#00151

lang.groovy.user

Subject: RE: memory profiling notes

Hi Guillaume,

here are some more details:

I profiled one of the examples your find under
http://webtest-community.canoo.com/wiki/space/Groovy/GroovyBuilder

As you can see, they are very small.
They work together with a lot of java objects from ANT and CanooWebTest.

I exported the profiling snapshot to html and attached it to this mail.
I could also provide the original file but this is > 8 MB. I'm happy to
upload
it somewhere if you give me directions.

As you can see, the GroovyShell.main is the root of 216'625 gc'ed objects
(i.e. "eligible" for Garbage Collection).
I tried to expand the tree such that you can see the interesting points.

new MetaClassRegistry(boolean) produces about 100'000 temporary objects,
50'000 in checkInitialised and
30'000 in registerInstanceMethods.

GroovyClassLoader.parseClass produces about 80'000 objects.

It may be a really small issue, but even GroovyMain.parseCommandLine()
eats up over 1'500 objects...

stay groovy
Mittie


> -----Original Message-----
> From: Laforge Guillaume
> [mailto:glaforge-OhS0PtBJVGYAvxtiuMwx3w@xxxxxxxxxxxxxxxx]
> Sent: Montag, 25. Oktober 2004 16:06
> To: user-i9PBDF1N6cxnkHa44VUL00B+6BGkLq7r@xxxxxxxxxxxxxxxx
> Subject: RE: [groovy-user] memory profiling notes
>
>
> Hello Dierk
>
> 200,000 sounds like a rather big number for a 50 lines script!
> You can send anything you've found, that can be interesting for us.
> The Parser will of course create a fairly good number of small
> objects, representing the tokens of the source being parsed. But
> well, perhaps 200,000 is really too big ;-)
> Please tell us what you found.
>
> Thanks
>
> PS: Well done for your Groovy integration :-), though
> unfortunately I haven't had the time nor the opportunity to play with :-(.
>
> --
> Guillaume Laforge
> http://glaforge.free.fr/weblog
>
>
> -----Message d'origine-----
> De?: Dierk Koenig
> [mailto:dierk.koenig-vS5zOjhOW+wAvxtiuMwx3w@xxxxxxxxxxxxxxxx]
> Envoye?: lundi 25 octobre 2004 15:51
> A?: user-i9PBDF1N6cxnkHa44VUL00B+6BGkLq7r@xxxxxxxxxxxxxxxx
> Objet?: [groovy-user] memory profiling notes
>
>
> Hiall,
>
> when doing some profiling on the Canoo WebTest project
> I ran into some rather interesting memory
> numbers of the Groovy support.
> It looks like even for some simple script execution with
> less than 50 lines of groovy code there are approx.
> 200'000 temporary objects created within Groovy.
> Most of them seem to stem from the parser.
>
> I understand that the Groovy project hasn't entered
> the optimizing phase yet. If somebody is anyway
> interested in the numbers I can provide more
> detail.
>
> I used the YourKit memory profiler.
>
> cheers
> Mittie
>

Attachment: mem_prof.zip
Description: Zip compressed data

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise