Review Request 129167: Lazy load export image, halving the startup time

Aleix Pol Gonzalez aleixpol at kde.org
Thu Oct 13 00:48:31 UTC 2016


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




src/Gui/ExportMenu.h (line 72)
<https://git.reviewboard.kde.org/r/129167/#comment67133>

    `bool mUpdatedImageAvailable = false;`
    
    You don't want it uninitialized



src/Gui/ExportMenu.cpp (line 197)
<https://git.reviewboard.kde.org/r/129167/#comment67134>

    this const& doesn't add much


- Aleix Pol Gonzalez


On Oct. 13, 2016, 2:06 a.m., Peter Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129167/
> -----------------------------------------------------------
> 
> (Updated Oct. 13, 2016, 2:06 a.m.)
> 
> 
> Review request for KDE Graphics and Boudhayan Gupta.
> 
> 
> Repository: spectacle
> 
> 
> Description
> -------
> 
> Conversion of a pixmap to a data URI is quite expensive. On my Skylake
> laptop (i7-6500HQ), it took one second to start. A perf trace showed
> that 65% of the time was spent in ExportManager::pixmapDataUri.
> 
> 
> Diffs
> -----
> 
>   src/Gui/ExportMenu.h 5040fe226bd22baabd8adc408b56fc012bef7d04 
>   src/Gui/ExportMenu.cpp 50333e0ffbfa9d382d42c6ee4c00fff1972df9a4 
>   src/Gui/KSMainWindow.cpp e0116356a55f205c3be6ce57661f0d754b1a94b0 
> 
> Diff: https://git.reviewboard.kde.org/r/129167/diff/
> 
> 
> Testing
> -------
> 
> Compile spectacle with debug info and obtain a perf trace:
> 
>     # close as soon as you see the window
>     perf record --call-graph=dwarf src/spectacle
>     # open five times, press Escape as soon as you seen the window
>     time src/spectacle
> 
> Repeat experiment and compare times and perf traces (`perf diff perf.data.old perf.data` and `perf report -i perf.data.old`).
> 
> To test that export is still working: open Export menu, hover over Share. The first time there is a small delay, the next time it will be faster due to lazy loading.
> 
> 
> Thanks,
> 
> Peter Wu
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-graphics-devel/attachments/20161013/6a3f6c14/attachment.html>


More information about the Kde-graphics-devel mailing list