Well, we can get as detailed as people want.  I just figured that, while we were 
throwing around ideas about what kind of programming paradigm and idioms we want, we 
may wish to consider using different kind of Reference objects or Collections that 
employ them (ala a WeakHashMap) in certain cases.  Judiciously used WeakReferences can 
pay out in spades on memory usage, which can also mean a performance boost in 
processing time as the GC isn't running as freuqently.  We could get more detailed in 
a discussion of this if you're interested, though...what aspects of Reference use did 
you want to discuss?

-----Original Message-----
From: Peter B. West [mailto:pbwest@;powerup.com.au]
Sent: Wednesday, November 06, 2002 6:55 PM
Subject: Re: HashMaps (WAS:RE: interface instead of implementation)

Rhett, Jeremias,

I was hoping there might be a little more detailed discussion here.  I 
have no experience of WeakHashMaps or the various Reference objects, but 
I have been thinking about using Reference objects, rather than direct 
references, to point to the Nodes in my Tree, with the idea that at 
least the first iteration in a cache/retrieve cycle on a subtree could 
be handled transparently within the Tree.


Rhett Aultman wrote:
> Mostly it was for caching benefits.  As I said, though, I haven't read enough code 
>to know.  I just thought I'd throw it out as a possibile way to save on memory usage 
>when FOP processes large documents.  *shrug* ;)
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev.jeremias@;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?

Peter B. West  [EMAIL PROTECTED]  http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to