Merge lp:~andrewmccarthy/unity-lens-photos/shotwellspeedup into lp:unity-lens-photos
Proposed by
Andrew McCarthy
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | David Callé | ||||
Approved revision: | 110 | ||||
Merged at revision: | 109 | ||||
Proposed branch: | lp:~andrewmccarthy/unity-lens-photos/shotwellspeedup | ||||
Merge into: | lp: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:~andrewmccarthy/unity-lens-photos/shotwellspeedup | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Callé (community) | Approve | ||
Review via email: mp+130652@code.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.
+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.