Memory consumption continued

I have done some tests concerning memory use. I have tested three different versions:

  • jSunnyreports 1.6.1.0 final
  • jSunnyreports 1.7.0.0 alpha ( full load )
  • jSunnyreports 1.7.0.0 alpha ( loading on yearly basis ).

I used my own testset consisting of 6 years of data and 10 different inverters. I used a minimum heap of 128mb and a maximum allowed heap of 1024mb and did all measurements using VisualVM.

The results:

jSunnyreports 1.6.1.0

1610_heap

Initial loading of all data takes up about a minute and right after loading the memory consumption stabilizes around 800Mb but the chart shows a few peaks around 900-950Mb. Meaning that with a maximum heapsize of 1024Mb jSunnyreports has just enough memory for this testset.

jSunnyreports 1.7.0.0 ( full load )

1700_heap

I made a special version which loads all the data in the same way as 1.6.1. The main difference between both versions is that some crucual arrays now have an appropriate guestimate how big it should be. Also the internal structure has changed, instead of using a Calendar object I now use a few primitive values to store the data needed.

The results are clearly noticable. Again loading takes about a minute. Right before the chart creation process memory consumption is just between 200-300mb. During the chart  creation process memory consumption is a erratic and fluctuates between 200 and 600mb.

Another interesting note is that this version is a bit faster compared to 1.6.1.0.

jSunnyreports 1.7.0.0 ( load on yearly basis )

1700_heap_year

This is the current 1.7 version downloadable from the website. It will load all data on a yearly basis. This version runs a bit slower than the two other versions listed here. This is because internally jSunnyreports runs fully for every year, including loading, purging and saving the cache.