<table><tr><td style="">jtamate updated this revision to Diff 36978.<br />jtamate retitled this revision from "From 1.03% to 0.08% cpu usage moving 50.000 files" to "From 100% plasma cpu usage to normal when using vivaldi".<br />jtamate edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-psjkem6kc666rys/">(Show Details)</a><br />jtamate edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-effyzjmzfkjhhlo/">(Show Details)</a><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/D10342">View Revision</a></tr></table><br /><div><div><p>Implement only the windowUrlFromMetadata cache.<br />
It avoids a 100% plasma cpu usage when using vivaldi in private navigation.</p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Store the const iterator returned, not the address, so it can be checked against constEnd().<br />
Call windowInfo instead of appData, because it is not as expensive. appData is being deleted, calculated and stored when changing tabs in konsole or saving files in kate.<br />
<br />
{F5695179}<br />
<br />
{F5695178}<br />
<br />
</span>Cache the calls to windowUrlFromMetadata, because it can be called quite often, for example with the vivaldi browser started, and it usually calls KServiceTypeTrader::defaultOffers that also involves I/O.<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;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Moving 50.000 small files in dolphin</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Browse</span> with <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">drag&drop between two disks.<br />
Doing that with vivaldi browser started</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">vivaldi browser in private navigation</span>.</div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D10342?vs=27177&id=36978">https://phabricator.kde.org/D10342?vs=27177&id=36978</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10342">https://phabricator.kde.org/D10342</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>libtaskmanager/xwindowtasksmodel.cpp</div></div></div><br /><div><strong>To: </strong>jtamate, Plasma: Workspaces, hein<br /><strong>Cc: </strong>mart, mwolff, broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>