D11487: simple optimization of TextLineData::attribute

2018-03-19 Thread Jaime Torres Amate
jtamate updated this revision to Diff 29925.
jtamate edited the summary of this revision.
jtamate edited the test plan for this revision.
jtamate added a comment.


  Same results, but more concise syntax with the range-based for.

REPOSITORY
  R39 KTextEditor

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11487?vs=29921=29925

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

AFFECTED FILES
  src/buffer/katetextline.h

To: jtamate, #frameworks, #kate
Cc: cullmann, michaelh, kevinapavew, ngraham, demsking, sars, dhaumann


D11487: simple optimization of TextLineData::attribute

2018-03-19 Thread Christoph Cullmann
cullmann added a comment.


  Looks reasonable.
  Could one use a C++11 range-based for?
  Given the container is const in that context, it won't detach, or?

REPOSITORY
  R39 KTextEditor

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

To: jtamate, #frameworks, #kate
Cc: cullmann, michaelh, kevinapavew, ngraham, demsking, sars, dhaumann


D11487: simple optimization of TextLineData::attribute

2018-03-19 Thread Jaime Torres Amate
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 

  
  to 19.12% of cpu F5758696: kate_after.png 

  
  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