<table><tr><td style="">broulik created this revision.<br />broulik added a reviewer: Plasma.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.<br />broulik 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/D12173">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Avoids calling into <tt style="background: #ebebeb; font-size: 13px;">QFontMetrics</tt> on startup for a method that is hardly used.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p><tt style="background: #ebebeb; font-size: 13px;">WorkspaceScripting::ScriptEngine::setupEngine</tt> consistently showed up with 1.2% on startup in <tt style="background: #ebebeb; font-size: 13px;">QFontMetrics</tt>, now it's virtually zero.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Verified in scripting console that <tt style="background: #ebebeb; font-size: 13px;">gridUnit</tt> still returns the same value it did before and that the method is not executed on startup anymore but whenever I call it from JS.</li>
<li class="remarkup-list-item">Created a new panel whose default height is <tt style="background: #ebebeb; font-size: 13px;">gridUnit * 2</tt>, its size looked sane</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12173">https://phabricator.kde.org/D12173</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>shell/scripting/scriptengine.cpp<br />
shell/scripting/scriptengine_v1.cpp<br />
shell/scripting/scriptengine_v1.h</div></div></div><br /><div><strong>To: </strong>broulik, Plasma<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>