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