Lazy load export image, halving the startup time
Review Request #129167 - Created Oct. 13, 2016 and submitted
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.
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.dataand
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.