This project is read-only.

Leading zone mechanism to reduce CPU load.

Sep 16, 2009 at 3:02 AM
Edited Sep 16, 2009 at 5:23 AM

I am thinking of adding additional functionality to reduce the CPU load of charting real-time data.  The plan is to add an leading area ahead of latest data point so that the new points do not cause all the other points to be redrawn in the x axis.

Once the new points fill the leading zone, a new leading zone is created and the entire graph will need to be re-drawn.

So if we have say 30minutes of data, the x axis could show 45minutes, only new points are drawn. Once an additional 15minutes of data is obtained the x axis is set to 60minutes to maintain a 15 minute leading zone, at this point all the data will need to be re-sampled and displayed.

This will cause CPU spikes but should reduce the overall CPU load.

Just thinking about this approach, the entire graph would have to be re-drawn if the latest data point y value is outside the current range.

What do you think?


Additionally.  I am not sure if you are doing this or not.

There is no need to draw all the points, just the number of pixels within the current graph width, so the plan would be to re-sample all the points when the latest data value exceeds the current graph bounds.  The plan would to take the highest and lowest within each pixel x data segment and plot those.

Does that sounds feasible within the current framework?

Sep 17, 2009 at 5:43 PM


your approach is right. The first idea is going to appear in a new version of LineChart, on which i'm working now, and the second method is already implemented in our FrequencyFilter, which (as other filters, too) can be added to a LineGraph's property Filters.


Sep 18, 2009 at 3:36 AM

Hi Mikhail,

great!  Looking forward to the new version of LineChart, what sort of time scale are you thinking.  I would be happy to help out, or review it once you have added the functionality.


Jon Middleton