Memory consumption continued

I just found this article about memory consumption of Calendar objects in Java. ( http://javaquirks.blogspot.nl/2008/03/size-of-javautilcalendar-is-432-bytes.html ).

Each individual instance uses 432 bytes, yes 432 bytes. That does not sound like much but if you use them frequently like I do that does add up to a large amount of memory being used.

I am currently profiling jSunnyreports with my own testset. And the preliminary results are shocking.

  • 2009, 6700 objects
  • 2010, 225000 objects
  • 2013, 650000 objects

650k objects in memory for just 2013, that means over 267Mb of data just for that single year alone. No wonder jSunnyreports crashes with severe memory issues.

That is some serious food for thought!