Skip to main content
Xcw.1
Associate II
April 16, 2020
Solved

How to improve the rendering speed of graph widget?

  • April 16, 2020
  • 2 replies
  • 1291 views

How to improve the rendering speed of graph widget, especially when there are many dots?

This topic has been closed for replies.
Best answer by Martin KJELDSEN

That really depends on what you're trying to do. And you're not providing a lot of info here, so i'll have to guess. The "Graph widget" is not really an official, optimized widget. It's something that was used in a demo at some point and has gotten a life of its own :) So there are a few things to consider here.

Generally, the "Graph" uses the Canvas/Shape renderer which is calculated by CPU solely.

1) If you're targeting a very live graph with lots of updates or fast updates, this will be heavy on the CPU

2) If you're targeting a graph that only updates a small, new segment of the graph at certain intervals (like EEG / medical applications) then it will perform a lot better of course because you're only calculating a little at a time.

3) You could maybe use Cacheable Container to your advantage where you render a container (with graph) to a piece of memory and use that as input to a dynamic bitmap which can then be transferred using DMA2D at no cost to CPU.

So what're you trying to do? :)

/Martin

2 replies

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
April 16, 2020

That really depends on what you're trying to do. And you're not providing a lot of info here, so i'll have to guess. The "Graph widget" is not really an official, optimized widget. It's something that was used in a demo at some point and has gotten a life of its own :) So there are a few things to consider here.

Generally, the "Graph" uses the Canvas/Shape renderer which is calculated by CPU solely.

1) If you're targeting a very live graph with lots of updates or fast updates, this will be heavy on the CPU

2) If you're targeting a graph that only updates a small, new segment of the graph at certain intervals (like EEG / medical applications) then it will perform a lot better of course because you're only calculating a little at a time.

3) You could maybe use Cacheable Container to your advantage where you render a container (with graph) to a piece of memory and use that as input to a dynamic bitmap which can then be transferred using DMA2D at no cost to CPU.

So what're you trying to do? :)

/Martin

Xcw.1
Xcw.1Author
Associate II
April 17, 2020

Thank you for your reply. I am using the graph widget from the "TouchGFX Demo 1 v1.2.0" project imported by designer 4.13. At the same time, the cache container has not been used.

Has the graph widget in this project been optimized? If not, where can I get the optimized graph widget? thank!

Xcw.1
Xcw.1Author
Associate II
April 17, 2020

Thank you for your reply. I am using the graph widget from the "TouchGFX Demo 1 v1.2.0" project imported by designer 4.13. At the same time, the cache container has not been used.

Has the graph widget in this project been optimized? If not, where can I get the optimized graph widget? thank!

Martin KJELDSEN
Principal III
April 17, 2020

There's no optimized graph widget. Applications are so specific in what they're trying to do it's impossible to create a generic widget that can do everything.

The Graph is not an official widget - The one in the demo is just a sample usage of the Canvas Widget Renderer to do e.g. a graph.

You didn't tell me what you're trying to do :)

/Martin