Closed rainman110 closed 6 months ago
have you tried to use a range based for loop instead (together with qAsConst) )? foreach does a copy of the container, which for Qt types is fast but this might be faster still. especially if you do not modify the range
have you tried to use a range based for loop instead (together with qAsConst) )? foreach does a copy of the container, which for Qt types is fast but sthis might be faster still. especially if you do not modify the range
No. It will probably do not harm to add qAsConst.
@mariusalexander I added qAsConst as suggested
Description
Just a small fix to avoid copies in for loops, which turned out to be a hot spot in the syntax highlighter.
This is just a part of the performance fix. The rest need to be done in the python module itself.
Fixes #1139
How Has This Been Tested?
Manually and via Performance Analysis in Visual Studio. Before, the for loop took a significant amount of the computing time.
Checklist:
EXPORT
. Non-interface functions are NOT exported.