<table><tr><td style="">jtamate updated this revision to Diff 31733.<br />jtamate edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-aekjbse4js5u64w/">(Show Details)</a><br />jtamate edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-2xn5uank3e5v573/">(Show Details)</a><br />jtamate added a reviewer: Frameworks.<br />jtamate added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D12016">View Revision</a></tr></table><br /><div><div><p>Cached the position in static variables of KateViewAccessible.<br />
The cache is invalidated when the signal Document::textChanged is received.<br />
Unfortunately, KateViewAccessible must inherit also QObject or connect will not work, because KateViewAccessible didn't inherit QObject.<br />
<strong>Is this change Binary compatible?</strong></p>
<p>At first I thought the changes will come in setText, but in my tests it has never been called.</p>
<p>To check the correctness of the result, I've run the fast and slow paths in kate, with several windows over the same document, changing it in sereveral ways, and the results always match.</p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">Use static variables to store information about last call<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> to positionFromCursor</span>.<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;">Open a callgrind log file with <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">2.840.605</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">more than 1.00.000</span> lines<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">,</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Go</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">go</span> to the end of the file, and then play with the PageUp, PageDown and cursor keys.<div style="padding: 8px 0;">...</div>After: the PageUp at any part of the file <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">as</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">is</span> as fast as in the beginning of the document.</div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D12016?vs=31579&id=31733">https://phabricator.kde.org/D12016?vs=31579&id=31733</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12016">https://phabricator.kde.org/D12016</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/CMakeLists.txt<br />
src/view/kateviewaccessible.cpp<br />
src/view/kateviewaccessible.h</div></div></div><br /><div><strong>To: </strong>jtamate, Kate, cullmann, Frameworks<br /><strong>Cc: </strong>cullmann, Frameworks, michaelh, kevinapavew, ngraham, bruns, demsking, sars, dhaumann<br /></div>