cancel
Showing results for 
Search instead for 
Did you mean: 

How to improve the rendering speed of graph widget?

Xcw.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

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

View solution in original post

4 REPLIES 4
Martin KJELDSEN
Chief III

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
Associate II

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!

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!

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