<table><tr><td style="">hein 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/D9119" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Personally, I disagree it's hack. It's just defensively written: It makes sure users of the Svg API don't need to understand the order in which they need to call setScaleFactor and setImagePath for good performance. For something performance-critical I'd prefer not to have to check every six months whether everyone is using it correctly. Sure, cleaning up the call site is nice anyway, but it won't guard against future call sites being wrong. Self-tuning code is smart and practical.</p>
<p>It's also going to work fine with multiple screens. Svgs are usually instanciated in batches. If it's a screen with a different scale factor the first in the batch will hit the old slow path, all subsequent ones will be fast.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R242 Plasma Framework (Library)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9119" rel="noreferrer">https://phabricator.kde.org/D9119</a></div></div><br /><div><strong>To: </strong>hein, Plasma, davidedmundson, broulik, mart<br /><strong>Cc: </strong>graesslin, plasma-devel, Frameworks, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>