I have a map with 75000 entries and each entry value will be of size 10kb on average.
I load this map into memory using Properties class . But due to the size of the map , I get OutOfMemoryException when the RAM on the host is small.
One option that i have is to read the entries in batches (like 10,000) into memory instead of loading the complete map.
Read the next 10k after processing the initial 10k.
Is there any way to accomplish this using Properties class.
Also, is there any better approach of loading the map entries in this manner?
Thanks and Regards,
Sujith
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…