I am implementing a tree-like structure using the Map interface like the following declaration:
Map<String, Map<String, Map<Integer, Double>>>
Currently I am using the HashMap implementation.
After loading a huge amount of data, I am seeing the program consume 4GB of RAM.
On persisting the whole entity using the Serializable interface, the resulting file's size is just 1GB.
What is the most memory-efficient Map implementation that I could use here?
List<FirstLevelNode>, withFirstLevelNodeholding aList<SecondLevelNode>, andSecondLevelNodeholding aList<ThirdLevelNode>?