Paul Taylor wrote:
Im currently using String.intern() in my app purely to reduce the
memory usage, this has worked well except the memory required for
intern() go into perm rather than heap, setting perm on different
platforms is on trivial so Im looking for a solution that works on
Heap. (Now before you say tune your applications please understand
that my app is memory bound based on how many files are loaded into it
, which can be anything from 10 to 100,000, in the long term I am
going to move to a database soln to solve this issue, but in the short
term I need intern() for heap memory)
Does SimpleStringInterner use heap, would it be sensible to use it for
a non lucene stuff, and what do the tableSize and maxChainLength
parameters mean. ?
thanks Paul
In case of interest to anyone
Having looked at the code it seems Lucene SimpleStringInterner still
uses String.intern() it just has some cpu optimizations to reduce
unneccessary calls to string.intern()
Google have a replacement for String.intern() which I think will do the
job for me
http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/collect/Interners.html
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org