Merge lp://qastaging/~andrewmccarthy/unity-lens-photos/shotwellspeedup into lp://qastaging/unity-lens-photos

Proposed by Andrew McCarthy
Status: Merged
Approved by: David Callé
Approved revision: 110
Merged at revision: 109
Proposed branch: lp://qastaging/~andrewmccarthy/unity-lens-photos/shotwellspeedup
Merge into: lp://qastaging/unity-lens-photos
Diff against target: 160 lines (+63/-36)
1 file modified
src/shotwell_scope.py (+63/-36)
To merge this branch: bzr merge lp://qastaging/~andrewmccarthy/unity-lens-photos/shotwellspeedup
Reviewer Review Type Date Requested Status
David Callé Approve
Review via email: mp+130652@code.qastaging.launchpad.net

Description of the change

This branch is an attempt to increase the speed of searching Shotwell's database. The changes include:

- Calculating the list of "matching" event ids once, before looping through the photos
- Similarly, calculating a list of matching photo thumbnails once, before looping
- Break out of the photo loop immediately if the limit is reached
- Moving some code around to reduce duplicated or unnecessary effort

I didn't remove any now-unused methods in case they're of use in the future.

In my case (21500 photos, 1200 events, 185 tags) searches that were about 10-12 seconds are now 2-4 seconds.

Hope it's of some use!

To post a comment you must log in.
Revision history for this message
David Callé (davidc3) wrote :

+1
Thanks a lot Andrew, I can clearly see the speed improvements.
Would you mind opening a bug about Shotwell search being slow and link it to this branch? I think this could make a nice SRU.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: