You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Rhett Aultman <Ra...@fcci-group.com> on 2002/11/06 18:16:47 UTC

HashMaps (WAS:RE: interface instead of implementation)

You mentioned HashMaps briefly here.  I suppose I could try auditing the code and answering my own question here, but I have very little free time in general. (Hopefully, I'll have more free time after Saturday...I've spent a lot of time for weeks studying for the GRE).  So, I'll just ask- has anyone considered looking into the potential memory benefits of using WeakHashMaps instead of HashMaps?

-----Original Message-----
From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
Sent: Wednesday, November 06, 2002 11:10 AM
To: fop-dev@xml.apache.org
Subject: Re: interface instead of implementation


Sorry, Keiron, for explicitly mentioning you. I was just working in the
maint branch seeing all those ArrayLists (former Vectors) and HashMaps
(former Hashtables) that are creeping through all the code. And then
your CVS commit came... I know I can be an elephant in a porcelaine
store sometimes. Sorry.

Anyway, I intend to overtake you with style error fixing soon. :-)

On 06 Nov 2002 16:43:06 +0100 Keiron Liddle wrote:
> Since I have removed over 3000 style errors you give me a bit of slack!!
> :)


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: HashMaps (WAS:RE: interface instead of implementation)

Posted by Jeremias Maerki <de...@greenmail.ch>.
For caching and if done correctly, yes, there could be benefits.
WeakReferences can be used if you have objects you want to keep but
you're not angry when they get swept away by the GC. Good for keeping
images and fonts in memory, but for overall FOP I don't see any use case.
Or can anyone think of another one?

On 06.11.2002 18:16:47 Rhett Aultman wrote:
> You mentioned HashMaps briefly here.  I suppose I could try auditing the
> code and answering my own question here, but I have very little free
> time in general. (Hopefully, I'll have more free time after
> Saturday...I've spent a lot of time for weeks studying for the GRE). So,
> I'll just ask- has anyone considered looking into the potential memory
> benefits of using WeakHashMaps instead of HashMaps?


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org