D11487: simple optimization of TextLineData::attribute

Jaime Torres Amate noreply at phabricator.kde.org
Mon Mar 19 14:45:50 UTC 2018


jtamate created this revision.
jtamate added reviewers: Frameworks, Kate.
Restricted Application added projects: Kate, Frameworks.
jtamate requested review of this revision.

REVISION SUMMARY
  Instead of getting the element to check 4 to 5 times each time, using the constant iterator, do it only one.
  
  From 76,84% of cpu F5758695: kate_before.png <https://phabricator.kde.org/F5758695>
  
  to 19.12% of cpu F5758696: kate_after.png <https://phabricator.kde.org/F5758696>
  
  in callgrind.

TEST PLAN
  Open a XML file with 4 lines an a line of 566039 characters long.

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D11487

AFFECTED FILES
  src/buffer/katetextline.h

To: jtamate, #frameworks, #kate
Cc: michaelh, kevinapavew, ngraham, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180319/5a765641/attachment.html>


More information about the Kde-frameworks-devel mailing list