Errors, bugs, questions - page 2667
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It turns out that profiler for script project displays results only when optimization is disabled, if optimization is enabled, everything runs, works, but without any results.
I had a bug of MT5 (build 2345) and did not understand why the profiler is running and working but no results are displayed.
It turns out that profiler for script project shows results only when optimization is disabled, if optimization is enabled then everything will run and work but without any result.
Profiler does not work for all indicators (without optimization). I wrote about it twice on forum, sent code to developers in PM - no answer.
Roughly speaking, I was wondering why two algorithms giving the same result in the end run at different speeds, a 1.7x drawdown in optimization mode.
As a result we gained practical experience with the MT5 profiler and detected a number of bugs in its operation.
As it is not clear whether the developers are interested in this information, and there is no desire to spend hours of time for localization of bugs, only brief information on the detected problems will be given:
1) There is no way to compare speeds of different algorithms.
So an algorithm that is three times faster than others, both with optimization enabled and without, may appear the slowest in the profiler.
Apparently there is some sort of profiler overhead, which affects the execution time of algorithms, in this case, there is no point in comparing the performance speed of algorithms in profiler.
2) Incorrect Count value in the histogram tooltips on the screen.
The profiler says that the function was started 80K times and not 20K times as expected, at the same time inside the function for different lines exceeds Count several times, for some lines three times and for others two times.
3) Incorrect value of Time in histogram tooltips on the screen.
There are cases when the profiler shows that the algorithm entered the condition 99.90% of times, and it actually happens only once out of 20K passages.
It's not a bug, it's more of an observation!
mt 5 build 2340.
Yesterday when I opened Data Directory I didn't notice how the Indicators folder was moved to the Experts folder. Then I disabled mt5 and enabled it today, the indicators can also be used from the Navigator as if nothing had happened. However, if I reopen the Data Folder, an empty Indicators folder will appear and if I move some indicator to it, it will not appear in Navigator. It will not appear in the Navigator. Return of the Indicators folder back to MQL5\Indicators solves the problem.
MT5 (build 2347) Why such a big overhead when adding one element at a time to an array using ArrayResize, if memory has been reserved for them in advance?
Please consider improving the internal reservation algorithm with ArrayResize.
For example, for classes we can assume that they perform some kind of "internal registering in lists" in addition to calling the constructor.
And within the framework of reservation with ArrayResize, apart from direct memory allocation, you can try to optimize the process:
- take data from the adjacent created element (e.g. pointer to a virtual function table);
- pre-execute or reserve space for "internal registration" of classes that have not yet been created;
MT5 (build 2347) Why such a big overhead when adding one element at a time to an array using ArrayResize, if memory has been reserved for them in advance?
Even that doesn't help.
It just doesn't make any sense. Instead of speeding up, it's just slowing down.
ZZZ Strange, the result of the example from the Documentation is zero.
Worked with profiler in MT5 (build 2345),
Roughly speaking, I was wondering why two algorithms, giving the same result in the end, run with different speed, a drawdown of 1.7 times in optimization mode.
...
MT5 (build 2347) Why such a big overhead when adding one element at a time to an array using ArrayResize, if memory has been reserved for them in advance?
If you want to compare, it should be:
If you want to compare, it should be:
On my side the comparison was what it was supposed to be.
I know how many elements will be placed in the array and instead of creating them all at once I reserve memory for the uncreated ones.
The problem is, if I reserve memory and create array elements one by one, it takes many times longer than just creating them all at once.
So for structures it is 7 times slower.
And it is twice slower for the class and int data types.
This is a very big difference, which I think developers can eliminate if they wish.