<table><tr><td style="">jtamate created this revision.<br />jtamate added a reviewer: Kate.<br />Restricted Application added projects: Kate, Frameworks.<br />Restricted Application added a subscriber: Frameworks.<br />jtamate requested review of this revision.
</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/D12511">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Calculate the list of keys of a hash table is quite expensive.<br />
It is cheaper to keep that list and change it when a view is created or removed.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Run kwrite and paste a relative long text several times and then undo until the text is empty, with only one view.<br />
Before: <a href="https://phabricator.kde.org/F5821740" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F5821740: kwrite_before.png</a> it used 65% of cpu in Kate::TextBuffer::notifyAboutRangeChange<br />
After: <a href="https://phabricator.kde.org/F5821746" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F5821746: kwrite_after.png</a> it uses 19% of cpu in in Kate::TextBuffer::notifyAboutRangeChange</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12511">https://phabricator.kde.org/D12511</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/document/katedocument.cpp<br />
src/document/katedocument.h</div></div></div><br /><div><strong>To: </strong>jtamate, Kate<br /><strong>Cc: </strong>Frameworks, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>