Review Request 129167: Lazy load export image, halving the startup time
Peter Wu
peter at lekensteyn.nl
Thu Oct 13 02:43:54 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129167/
-----------------------------------------------------------
(Updated Oct. 13, 2016, 4:43 a.m.)
Review request for KDE Graphics and Boudhayan Gupta.
Changes
-------
Addressed comments, thanks for reviewing
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 (updated)
-----
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/6e709c12/attachment.html>
More information about the Kde-graphics-devel
mailing list