D9119: Initialize scale factor to the last scale factor set on any instance

Eike Hein noreply at phabricator.kde.org
Sun Dec 3 10:21:22 UTC 2017


hein added a comment.


  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.
  
  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.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D9119

To: hein, #plasma, davidedmundson, broulik, mart
Cc: graesslin, plasma-devel, #frameworks, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20171203/5ddf4f31/attachment.html>


More information about the Plasma-devel mailing list