D11992: Fix bad performance for `addRules` in `DefaultHighlighter` for big containers
Nikita Sirgienko
noreply at phabricator.kde.org
Sat Apr 7 09:34:23 UTC 2018
sirgienko added a comment.
In D11992#241763 <https://phabricator.kde.org/D11992#241763>, @asemke wrote:
> Can you please provide your octave functions which you used to test with?
#Entry 1
function nothing(n)
printf("do nothing");
endfunction;
#Entry 2
function nothing1(n)
printf("do nothing");
endfunction;
#Entry 3
function nothing2(n)
printf("do nothing");
endfunction;
#Entry 4
function nothing3(n)
printf("do nothing");
endfunction;
#Entry 5
function nothing4(n)
printf("do nothing");
endfunction;
F5797830: testoctave.cws <https://phabricator.kde.org/F5797830>
Without this patch, it takes 4-5 seconds to run this 5 entries.
> P.S. : the template for DefaultHighlighter::addRules() in defaulthighlighter.h looks like an overkill - this function is called only twice in the code and the container is always QStringList. The same is true most probably for other templated add*() funcitons in defaulthighlighter.h. We should simplify this maybe.
I agree, that we should simplify this templates methods to not template functions, which acepting `QStringList`. Should I add it to this diff?
REPOSITORY
R55 Cantor
REVISION DETAIL
https://phabricator.kde.org/D11992
To: sirgienko, #cantor, asemke
Cc: #cantor, #kde_edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180407/1251f6ae/attachment-0001.html>
More information about the kde-edu
mailing list