3 months ago on Java 1.4.2 I had a situation where I needed to analyze highly non-normalized data with the inmem db hypersonic, to save memory I builded intern() on all strings being inserted into the database to save memory, the result was I could load less data than without intern() being used. (I now use a hashmap to make all same strings one instance, which works fine for memory usage reduction) BTW one rare thing I noticed that the interned strings are not visible as memory being used by the java process on windows (normal heap string usage is visible as more memory being used by java process)
|