Skip to content

CPU usage with real time xy chart and lots of points #554

@landret

Description

@landret

Hi,
I am doing real time data acquisition and display data with xy chart. I noticed that the API is using quite a lot of CPU and I had to do several tricks to limit this

Here is what I get after doing the following:

  • limiting the number of total displayed points to a max of 5000
  • limit the xchartpanel update rate to a period of 500ms

In this example, there are 12 data, but a total of 5000 points displayed
real time chart with 12 data

CPU and memory

So what the CPU consumption I get with this is pretty good: around 8% cpu. But I would like to decrease the xchartpanel update rate period down to ideally 100ms. However, dividing the period by 2 also doubles the cpu load.

Here are the methods which seem to consume most of the CPU:

  • chartpart.PlotContent_XY.doPaint()
  • chartpart.PlotSurface_AxesChart.paint()
  • chartpart.AxisTickLabels.paint()

methods and cpu

Would there be a way to decrease this load?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions