Canvas vs Labels - page 11

 

So, here are the results of the comparison of the displays without and with refresh rate limitation.

The sources for repeating these measurements can be downloaded here:https://www.mql5.com/ru/code/33898

Дисплей с оптимизацией для вывода текста в чарт по типу консоли
Дисплей с оптимизацией для вывода текста в чарт по типу консоли
  • www.mql5.com
Данная библиотека позволяет создавать дисплеи для удобного вывода текстовой информации в чарт с наиболее оптимальной скоростью
 

I am also publishing the results of the comparison in the terminal chart, for which I have specially written an expert working in the loop, both in the chart and in the tester.

Download its source code from KB:https://www.mql5.com/ru/code/33898

Results comparison table

Canvas unlimited fps Canvas limited fps Labels unlimited fps Labels limited fps
Min delay (μs) 1530 1 18 0
Mid delay (μs) 7674 4086 48 7
Max delay (μs) 11967 11093 785 286
Total (μs) 77727510 29452299 39648984 27439654

 
Mihail Matkovskij:

So, here are the results of the comparison of the displays without and with refresh rate limitation.

You can download the source code for repeating these measurements here:https://www.mql5.com/ru/code/download/33898/chartdisplay.mqh and here: https://www.mql5.com/ru/code/download/33898/canvasvslabelstester.mq5.

Where's the limitFps?

 
Dmitry Fedoseev:

Where are the limitFps?

Download files in\MQL5\Experts\canvas-vs-labels\measurement\cyberdev\ and \MQL5\Experts\canvas-vs-labels\measurement\ in KB. To limit fps, set limit_fps to true in the input parameters. file: CanvasVsLabels.mq5. How to run the test is shown above. And there is a description in KB.

 
Mihail Matkovskij:

Download files in\MQL5\Experts\canvas-vs-labels\measurement\cyberdev\ and \MQL5\Experts\canvas-vs-labels\measurement\ in KB. To limit fps, set limit_fps to true in the input parameters. file: CanvasVsLabels.mq5. How to run the test is shown above. And there is a description in KB.

The question was specifically asked about limitFps.

And I don't need it, it's clear to me long time ago that your fantasies don't correspond to reality. The whole interest is to see where you are going wrong again.

 
Dmitry Fedoseev:

The question was specifically asked about limitFps.

This is an update limit. It is made so that the display updates do not exceed the minimum refresh rate acceptable to the human eye. Hence the performance gain in Kanvas even compared to Labels. And if this limitation is applied to the Labels, such a display flies at all. The measurement results are above. Plus, I've mentioned it before. I don't understand what's not clear to you or, what's wrong with you...?

 
Nikolai Semko:
Renat Fatkhullin:

How can I manually limit kanvas refresh rate in the visualizer?

So that at slow speed the picture is refreshed in real time, and at fast speed it doesn't slow down the test?

Right now canvas (if it is updated on every tick) is really slowing down the whole visualization (profiling shows 80-90% of rendering time). I twisted with configurable pause in seconds, but it's a crutch, limiting functionality (picture updates rarely even at slow speed).

What to bind to so it doesn't refresh too often? GetMicroseconds?

Which functions to skip?

 
Andrey Khatimlianskii:

How can I limit the kanvas refresh rate in the visualizer in a human way?

So that at slow speed the picture is refreshed in real time, and at fast speed it doesn't slow down the test?

Right now canvas (if it is updated on every tick) really slows down the whole visualization (profiling shows 80-90% of rendering time). I twisted with configurable pause in seconds, but it's a crutch, limiting functionality (picture updates rarely even at slow speed).

What to bind to so it doesn't refresh too often? GetMicroseconds?

What functions to skip?

In the MT5 tester, the timer works, you can set it to 60 sec and it will update once per minute according to tester time)

 
Mihail Matkovskij:

This is an update limitation. It is made so that the display updates do not exceed the minimum refresh rate acceptable to the human eye. Hence the performance gain of Canvas, even compared to Labels. And if this limitation is applied to the Labels, such a display flies at all. The measurement results are above. Plus, I've mentioned it before. I don't understand what's not clear to you or, what's wrong with you...?

Did I ask what it is?

 
Found the right files. It's not clear where, where and when to look at the numbers, but even without that it's obvious to the naked eye that the canvas is significantly slower, with not just a canvas instead of one lebla, but one canvas instead of a bunch of labels.