Large data structure optimisation

I have a data structure:

List<Map><Comparable, Map><Comparable, short[]>>>

Which is weighing in at around 2 gigs or so, the keyset at both levels of map is around 4000 entries. The comparable's are generally Strings with length of about 10. I'm looking for ideas for reducing the memory usage of the structure, with creation performance being relevant but not critical.

Message was edited by:

MarkW5

Sorry about the formatting of the generics I couldn't make it work better.

[539 byte] By [MarkW5a] at [2007-11-27 2:29:17]
# 1

> I have a data structure:

>

> List<Map><Comparable, Map><Comparable, short[]>>>

>

> Which is weighing in at around 2 gigs or so, the

> keyset at both levels of map is around 4000 entries.

> The comparable's are generally Strings with length of

> about 10. I'm looking for ideas for reducing the

> memory usage of the structure, with creation

> performance being relevant but not critical.

>

> Message was edited by:

> MarkW5

> out the formatting of the generics I couldn't make it

> work better.

it's better to use a database (i think)

alexpallarsa at 2007-7-12 2:42:20 > top of Java-index,Java Essentials,Java Programming...
# 2
do you need all of this structure in memory at once?
georgemca at 2007-7-12 2:42:20 > top of Java-index,Java Essentials,Java Programming...
# 3
Where does all the data come from? And does it really all need to be memory at the same time?I'm not sure that trying to optimize the structure is going to gain you much - but it's hard to tell anything without answers to those two questions...Grant
ggaineya at 2007-7-12 2:42:20 > top of Java-index,Java Essentials,Java Programming...