On Tuesday, June 22, 2010 00:11:21 Taif [via jogamp] wrote:
>
> I've recently fallen love with the java allocation instrumenter
>
>
http://code.google.com/p/java-allocation-instrumenter/>
> Garbage collection can be a pain when you're trying to create visuals that
> run smooth as milk. The solution? Never allocate anything while the
> "visuals" are running (front load all the allocation).
>
> However, I'm being bugged by the fact that GLCanvas.display calls
> com.jogamp.opengl.impl.GlDrawableHelper's display method, which creates an
> AbstractIterator just to iterate an ArrayList.
>
> Of course, I'd fix this myself, but then I wouldn't have the nice
> signed-applet-certificates that you guys offer.
>
> Are all those iterators really necessary? Perhaps its some really subtle
> concurrency detail?
>
> Tl;Dr? com.jogamp.opengl.impl.GlDrawableHelper allocates an Iterator every
> frame - and I'm trying to reduce the allocation footprint of my opengl app.
Taif, you were completly right.
I have observed the same off behavior of megabytes of temporary object allocations,
mainly the Iterators.
Fixed with:
http://github.com/sgothel/jogl/commit/6ced17f0325d5719e992b246ffd156e5b39694b4http://github.com/sgothel/jogl/commit/774138544e1eec3330309ad682fa05154a07ab8d#diff-99Now we don't behave like a memory hog anymore, I hope :)
Sorry that it took so long, but I have missed this conversation for some reason.
Cheers, Sven