Performance testing of individual text labels and bitmaps on a chart - page 3

 
Renat:

Posted an updated test. It now shows the resolution used and with a hint on how to test.

Well, that's pretty much what we're doing.
 
sergeev:


In general, all tests show that bitmaps are somehow slower.

+ I have my doubts about the correctness of having to read the marker coordinate. why check the conveyor?

Actually the tests show it's not slower. At least not on modern CPUs.

Here's my result on i7-3770S, Windows 8 x64, 16 RAM, NVIDIA GeForce GT 640M:

2013.04.27 22:21:50     BenchmarkLabel (EURUSD,M15)     Тестирование завершено
2013.04.27 22:21:50     BenchmarkLabel (EURUSD,M15)     5. Время обновления текста и позиций у битмапа без прозрачности = 15007 ms
2013.04.27 22:21:35     BenchmarkLabel (EURUSD,M15)     4. Время обновления текста и позиций у битмапа с прозрачностью = 15257 ms
2013.04.27 22:21:20     BenchmarkLabel (EURUSD,M15)     3. Время обновления текста и позиций у меток со чтением = 16739 ms
2013.04.27 22:21:03     BenchmarkLabel (EURUSD,M15)     2. Время обновления текста и позиций у меток без чтения = 18845 ms
2013.04.27 22:20:44     BenchmarkLabel (EURUSD,M15)     1. Время обновления текста у меток без чтения = 21497 ms
2013.04.27 22:20:23     BenchmarkLabel (EURUSD,M15)     0. Время разогрева динамических очередей без визуализации = 124 ms
2013.04.27 22:20:23     BenchmarkLabel (EURUSD,M15)     Для корректного теста подберите размер окна 1024 x 768 пикселей, без индикаторов, не трогайте ничего, не сворачивайте и не закрывайте окна
2013.04.27 22:20:23     BenchmarkLabel (EURUSD,M15)     Разрешение чарта: 1020 x 761 пикселей

Bitmap has 15,257ms with all transparencies vs 21,497ms for tags.

Pipeline checks are important because real-world work often involves reading object parameters before changing them. And the more often there is read/write mixing in objects, the slower object modification will work. The best strategy for modifying objects is to first read in bulk and then write in bulk, avoiding mixing. Especially if you have thousands of objects on the chart.


The most important result of the test is that there is no multiple, ten or fifty times lag in bitmaps. Even if there may be a lag as in the measurements above (but there are questions about the size and configuration of the working chart), they are within a dozen percent.

But with all that a bitmap has a huge perspective on speed with more objects, increased rendering quality (including transparency) and the ability to render whatever you want.

 

You can set it up even faster:

1. Reduce the chart window so that the created canvas covers ~100% of it.

2. Set a monochrome chart colour scheme (via properties -> colours -> colour scheme)/.

3. Scale down the chart to minimum (candles at maximum size).

But. As you can see, although the absolute numbers of the benchmark will be lower, their relative values will be +/- the same.

 

Note how some component of the computer caused the performance of mixed object handling to drop by a factor of 3(sanyooooook test):

:

Most likely the CPU (locks killed it?) and memory are to blame. Interesting to know which processor was used.

Or maybe the computer was just stressed or the screen was jerking at the time of this test.

 
sergeev:

But I would draw graphs with a bitmap. for there are no options :) also multi-object tables.

A bitmap has as many advantages as objects.

I agree. Each component is good for its purpose. Bitmaps are indispensable, for example, for drawing interface elements. Well, there are no other options.

But it's faster/efficient to output the statistics with tags. :)

 
voix_kas:

But. As you can see, although the absolute benchmark numbers will be lower, their relative values will be +/- the same.

I purposely specified the input conditions, so that there are no random errors and everyone understands the requirements of clean measurement.

Your result with 2355ms in one of the tests was caused by hiding/hiding/sliding/switching the terminal window during the test:

2013.04.27 20:09:37     BenchmarkObjects (EURUSD,M5)    5. Время обновления текста и позиций у битмапа без прозрачности = 12558 ms
2013.04.27 20:09:24     BenchmarkObjects (EURUSD,M5)    4. Время обновления текста и позиций у битмапа с прозрачностью = 12839 ms
2013.04.27 20:09:11     BenchmarkObjects (EURUSD,M5)    3. Время обновления текста и позиций у меток с чтением = 2355 ms
2013.04.27 20:09:09     BenchmarkObjects (EURUSD,M5)    2. Время обновления текста и позиций у меток без чтения = 10655 ms
2013.04.27 20:08:58     BenchmarkObjects (EURUSD,M5)    1. Время обновления текста у меток без чтения = 10359 ms
2013.04.27 20:08:48     BenchmarkObjects (EURUSD,M5)    0. Время разогрева динамических очередей без визуализации = 124 ms
 
You may be surprised, but this test (#3) does not work for me. I wrote to the SD(#732578). More precisely, it passes in one case out of a dozen. No notifications or errors in the log. The terminal just hangs for the duration of this test.
 
papaklass:

My desktop test

Yes, Renat, what a resolution you've chosen. It took me a while to find everything on the screen after 1920 x 1080. I'll run it on my laptop now.

Thanks for the results. Bitmaps are getting faster too.

 
voix_kas:
You may be surprised, but this test (#3) does not work for me. I wrote to the SD(#732578). More precisely, it passes in one case out of a dozen. No notifications or errors in the log. The terminal just hangs for a while while passing this test.
Thank you, let's look into it.
 
Renat:

Note how some component of the computer caused the performance of mixed object handling to drop by a factor of 3(sanyooooook test):

:

Most likely the CPU (locks killed it?) and memory are to blame. Interesting to know which processor was used.

Or maybe the computer was just being stressed or the screen was being jerked at the time of this test.

During the first test, I switched the window, during the second I did not touch anything at all, at the same time MT4 is running in it a script is running chart and a few other processes that may load the computer )