Canvas incredibly slow. Why? - page 2

 
Alain Verleyen #:

I made a check on my own code, it matches more or less your results. The 'culprit' is TextOut. Though I have 16 calls in my test.

Though, I don't see why your think " That bad performance makes it actually completely useless ", it's still perfectly usable for a GUI.

For 1-2 fields, surely no problem, but when you have some statistical fields, for actual tick processing plus updated fields like every 500ms, lets say 50 fields, and then there is the glitch with 1000 us, your chart will be held for 50x1000us which is 50 ms solely for that, plus 100 for tick itself, plus 50-100 ms for a simple update for getting the current chart-dimensions (which has to be updated frequently since MT5 and MT4 still don´t do it automatically always), the chart will lag all the time. And then, some people have 30-40 charts open same time and not even Windows can tell u reliably, if the window is currently visible or not, means, you are updating everything all the time. 

For static stuff, all fine, but not for statistical stuff in between ticks. 

 

There is no point in rendering more than 50 FPS.


If you subscribe to all symbols in the Market Watch, the tick frequency will sometimes be higher than 1000 Hz. But even the Terminal limits the FPS of the Market Watch visualization.

 
fxsaber #:

There is no point in rendering more than 50 FPS.


If you subscribe to all symbols in the Market Watch, the tick frequency will sometimes be higher than 1000 Hz. But even the Terminal limits the FPS of the Market Watch visualization.

50 fps? I talk about way less than 10 fps and worse. 

 
Doerk Hilger #:

50 fps? I talk about way less than 10 fps and worse. 

50 fps == 20 ms/frame. This is more than the stated values ​​in the first post.

Forum on trading, automated trading systems and testing trading strategies

Canvas incredibly slow. Why?

Doerk Hilger, 2024.12.09 10:20

This little piece of code, which does not more than painting 3 times a text, needs between 0.3 and 1ms.