D15129: improve performance of Rule::isWordDelimiter and KeywordListRule::doMatch
cullmann created this revision. cullmann added reviewers: vkrause, dhaumann. Herald added projects: Kate, Frameworks. Herald added subscribers: kde-frameworks-devel, kwrite-devel. cullmann requested review of this revision. TEST PLAN make && make test before, perf tells for perf record -g ./bin/htmlhighlighter_test > Rule::match 40% & KeywordListRule::doMatch 26% after the patch > Rule::match 17% & KeywordListRule::doMatch 4.5% = binary search was slower, contains is much faster on the VERY small strings REPOSITORY R216 Syntax Highlighting BRANCH master REVISION DETAIL https://phabricator.kde.org/D15129 AFFECTED FILES src/lib/rule.cpp src/lib/rule_p.h To: cullmann, vkrause, dhaumann Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
D15129: improve performance of Rule::isWordDelimiter and KeywordListRule::doMatch
cullmann added a comment. And yes, you see even the costs for the auto defData = DefinitionData::get(m_def.definition()); as a high percentage, close to the total costs of KeywordListRule::doMatch now. REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D15129 To: cullmann, vkrause, dhaumann Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
D15129: improve performance of Rule::isWordDelimiter and KeywordListRule::doMatch
cullmann updated this revision to Diff 40572. cullmann added a comment. optimize html exporter, 23% => 15% of runtime for applyFormat in unit test REPOSITORY R216 Syntax Highlighting CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D15129?vs=40571&id=40572 BRANCH master REVISION DETAIL https://phabricator.kde.org/D15129 AFFECTED FILES src/lib/htmlhighlighter.cpp src/lib/rule.cpp src/lib/rule_p.h To: cullmann, vkrause, dhaumann Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
D15129: improve performance of Rule::isWordDelimiter and KeywordListRule::doMatch
cullmann updated this revision to Diff 40573. cullmann added a comment. add my copyright, too REPOSITORY R216 Syntax Highlighting CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D15129?vs=40572&id=40573 BRANCH master REVISION DETAIL https://phabricator.kde.org/D15129 AFFECTED FILES src/lib/htmlhighlighter.cpp src/lib/rule.cpp src/lib/rule_p.h To: cullmann, vkrause, dhaumann Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
D15129: improve performance of Rule::isWordDelimiter and KeywordListRule::doMatch
vkrause accepted this revision. vkrause added a comment. This revision is now accepted and ready to land. Very nice, thank you! REPOSITORY R216 Syntax Highlighting BRANCH master REVISION DETAIL https://phabricator.kde.org/D15129 To: cullmann, vkrause, dhaumann Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
D15129: improve performance of Rule::isWordDelimiter and KeywordListRule::doMatch
This revision was automatically updated to reflect the committed changes. Closed by commit R216:9556855dcf18: improve performance of Rule::isWordDelimiter and KeywordListRule::doMatch (authored by cullmann). REPOSITORY R216 Syntax Highlighting CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D15129?vs=40573&id=40579 REVISION DETAIL https://phabricator.kde.org/D15129 AFFECTED FILES src/lib/htmlhighlighter.cpp src/lib/rule.cpp src/lib/rule_p.h To: cullmann, vkrause, dhaumann Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
D15129: improve performance of Rule::isWordDelimiter and KeywordListRule::doMatch
dhaumann added a comment. Very nice. REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D15129 To: cullmann, vkrause, dhaumann Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann