Event Loop in Import Page is Quadratic in Time
I'm not quite sure what's going on here, but I plugged in an sd card with ~5000 photos and hit the "mass storage camera" tab in the left pane. As the images populate in ImportPage.load_previews_and_metadata performance (in terms of previews loaded per second) gradually decreases over time. This seems to be due to the spin_event_loop
method called at the end of the loop taking longer every call.
Interestingly if you only call the spin event loop every 10 iterations the time for each call goes up by much less than a factor of 10 (arguably pretty close to a factor of 1). I wonder if the real win here would be splitting out the rest into a different thread? and doing the event loop processing from the main thread? (though in that case is it even necessary)