[OpenJDK 2D-Dev] sun.java2D.pisces big memory usage (waste ?)

Andrea Aime andrea.aime at geo-solutions.it
Wed Apr 3 08:09:25 UTC 2013


On Mon, Apr 1, 2013 at 11:20 PM, Laurent Bourgès
<bourges.laurent at gmail.com>wrote:

> Andra & Jim,
>
> Here is the current status of my patch alpha version:
> http://jmmc.fr/~bourgesl/share/java2d-pisces/
>
> There is still a lot to be done: clean-up, stats, pisces class instance
> recycling (renderer, stroker ...) and of course sizing correctly initial
> arrays (dirty or clean) in the RendererContext (thread local storage).
> For performance reasons, I am using now RendererContext members first
> (cache for rowAARLE for example) before using ArrayCaches (dynamic arrays).
>

Thank you Laurent, those are some nice speedups.
About the thread local storage, that is a sensible choice for highly
concurrent systems, at the same time, web containers normally complain about
orphaned thread locals created by an application and not cleaned up.
Not sure if ones created at the core libs level get special treatment, but
in general, I guess it would be nice to have some way to clean them up.

I'm not familiar with the API, but is there any way to clean them up when
the graphics2d gets disposed of?
A web application has no guarantee to see the same thread ever again during
his life, so thread locals have to be cleaned right away.

Either that, or see if there is any way to store the array caches in a
global structure backed by a concurrent collection to reduce/eliminate
contention.

Cheers
Andrea

-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20130403/71ecdc09/attachment.html>


More information about the 2d-dev mailing list