D12016: [ktexteditor] much faster positionFromCursor
    Jaime Torres Amate 
    noreply at phabricator.kde.org
       
    Sat Apr  7 11:16:47 UTC 2018
    
    
  
jtamate created this revision.
jtamate added a reviewer: Kate.
Restricted Application added projects: Kate, Frameworks.
Restricted Application added a subscriber: Frameworks.
jtamate requested review of this revision.
REVISION SUMMARY
  Use static variables to store information about last call.
  As most of the time the cursor is close to the previous position, avoid to calculate every time the size of the lines from the beginning of the document, just calculate it from the previous cursor position.
TEST PLAN
  Open a callgrind log file with 2.840.605 lines
  Go to the end of the file, and then play with the PageUp, PageDown and cursor keys.
  Before: it was unable to do continuous PageUp refreshes.
  After: the PageUp at any part of the file as as fast as in the beginning of the document.
REPOSITORY
  R39 KTextEditor
REVISION DETAIL
  https://phabricator.kde.org/D12016
AFFECTED FILES
  src/view/kateviewaccessible.h
To: jtamate, #kate
Cc: #frameworks, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180407/fe2b8b43/attachment.html>
    
    
More information about the Kde-frameworks-devel
mailing list