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

Peter Wu peter at lekensteyn.nl
Thu Oct 20 20:47:50 UTC 2016


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

(Updated Oct. 20, 2016, 8:47 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Graphics and Boudhayan Gupta.


Changes
-------

Submitted with commit a6911eb80af1f67c9130d7749b3161cc40467041 by Peter Wu to branch master.


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/20161020/31d105d6/attachment-0001.html>


More information about the Kde-graphics-devel mailing list