Review Request 123791: Cache the theme in the integration plugin

Daniel Vrátil dvratil at kde.org
Thu May 14 14:19:57 UTC 2015



> On May 14, 2015, 3:38 p.m., Aleix Pol Gonzalez wrote:
> > src/integrationplugin/ktexttohtml.cpp, line 35
> > <https://git.reviewboard.kde.org/r/123791/diff/1/?file=369036#file369036line35>
> >
> >     Shouldn't this be a Q_GLOBAL_STATIC?

I thought that Q_GLOBAL_STATIC holds a pointer to the object so it would not let me replace it (because it's QGS who manages the object's lifetime)?


- Daniel


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123791/#review80345
-----------------------------------------------------------


On May 14, 2015, 1:48 p.m., Daniel Vrátil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123791/
> -----------------------------------------------------------
> 
> (Updated May 14, 2015, 1:48 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kemoticons
> 
> 
> Description
> -------
> 
> Loading KEmoticonsTheme can be quite expensive (because of the IO when loading the theme), so for example switching between emails in KMail is unnecessarily slow just because of rebuilding the theme every single time.
> 
> This change makes the current theme globally cached and will only reload the theme when KEmoticons::currentThemeName() returns different value.
> 
> 
> Diffs
> -----
> 
>   src/integrationplugin/ktexttohtml.cpp 3392ccc 
> 
> Diff: https://git.reviewboard.kde.org/r/123791/diff/
> 
> 
> Testing
> -------
> 
> Switching between emails in KMail is faster now (even more noticable when the system is under load). 
> Switched to another emoticon theme in System Settings, then opened another email in KMail and it correctly used the new theme.
> 
> 
> Thanks,
> 
> Daniel Vrátil
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150514/e951f622/attachment.html>


More information about the Kde-frameworks-devel mailing list