Cache performance

 

Results

I just have finished the cache handler in jSunnyreports. I have done a preliminary test, here are the results:

465 files from the Solarmax 2000S PDL logger ( 2 years of data ).

  • jSunnyreports 1.2.0.0b6 without cache : 63 seconds
  • jSunnyreports 1.3.0.2A WITH cache¬† (cachesave¬† ON): 37,6 seconds ( 1 file was changed ).
  • jSunnyreports 1.3.0.2A WITH cache ( cachesave OFF ): 30 seconds ( 1 file was changed ).

A 25,4 seconds performance gain between these two versions.  That is a 40% performance gain. And with cache save off a further 6 seconds decrease ( 50% performance boost )

All the coding is done, I’m currently testing this new version if I can find any errors.

Further improvement

I can make another improvement. Loading and saving the cache is still quite expensive to do. Instead of saving the cache all the time I could add a “save once a day” mechanism.