I have the following nested hashmap:
HashMap<Foo1, HashMap<Foo2, TObjectDoubleHashMap<Foo1>>> my_map;
There are over a million entries in the TObjectDoubleHashmap and takes about a minute to generate. What are my options to save it to file so it won't need to be generated every time?
So far I've saved the actual keys and values to a text file then load it into the hashmap again, but that is not saving that much time. Is there a faster way such as saving it as an object using serialization? If so, what do I have to do to make my keys serializable?