This opens up the path to unobtrusive refreshes and automatic plot updates.

All plots now contain meaningful data, the previous version used some bogus values.

As you can see in the above graph, over 15 seconds is spent in waiting for the server to return all plot data.

And the reason this now takes so long is very simple: all values are calculated on-the-fly by the server from stored 5-minute values. That’s over 100,000 aggregated values to generate a simple 52-week bar graph!

All this should sort itself out once I start caching hourly and daily results in the database. For now, only the raw readings and the 5-minute aggregated counts get stored. The finecky bit is to make all aggregations / calculations consistent across arbitrary JeeMon restarts.

Just an idea – probably you should try to use only one Ajax call with JSON structure as return for the “live” streams of data. One call every 1sec or less. That will speed up the process and reduce complexity, but it may require to re-code how your graphics are built.

For the most of the historycal screens best way is to store data inside database and generate graphics on the fly as (html canvas tags) in your case.

Indeed, rrdtool could deal with such issues. But it will take only a few dozen lines of code to solve this and I really don’t want to introduce installation dependencies (JeeMon runs on six seven platforms right now).