Tag problem with imported photos
Mandatory: Shotwell version the issue was seen with
0.30.1 - Celle with Ubuntu 18.10
The expected behaviour
Shotwell should show the tags previously assigned to each photo by a previous version of shotwell
What was actually happening
Imported photos have ALL tags assigned that shotwell contains in it's database at the time of import, causing apparent lockup of shotwell if thousands of photos are imported.
Steps to reproduce the issue
This seemed the same behaviour as #75 (closed) to me so I added my issue to that but it appears that #75 (closed) has become dormant so please forgive me for creating this as a new issue.
My previous use of shotwell was with 0.22.0 under Ubuntu 16.04 LTS.
I decided recently to move from Ubuntu 16.04 LTS to 18.10. In doing so, I backed up all my data and installed 18.10 on a new partition. I then installed shotwell and imported my previous shotwell photo library (about 11,000 photos, most with up to 5 tags). Shotwell appeared to lock up after importing and also on each startup and again whenever a tag was selected, the tag apparently attached to virtually all photos.
This behaviour happens with 0.30.1 – “Celle” under Ubuntu 18.10. I do not know when this behaviour started having not tried anything between these versions.
I hope the following example (easily reproduced) helps in identifying the problem. I have cleared out shotwell library (deleted shotwell in .local/share).
I created 4 different directories with one sample photo (with tags as shown below) in each directory - so 4 photos and 12 tags with no photo having more than 4 tags.
I then imported (in place) each of the 4 directories separately.
pic 1 tags A,B,C
pic 2 tags D
pic 3 tags E,F,G,C
pic 4 tags H,I,J,C
The 1st pic imported correctly with its 3 tags (ABC).
the 2nd pic imported with its tag (D) and also incorrectly inherited all existing tags (ABC).
The 3rd pic imported with its tags (EFGC) and also incorrectly inherited all existing tags (ABD).
The 4th pic imported with its tags (HIJC) and incorrectly inherited all other existing tags (ABDEFG) (All 12 tags attached!!!)
The result is that each photo has whatever tags it contains itself and also seems to inherit incorrectly all other tags known by shotwell at that time. The actual JPG files do not seem to get updated (thank God).
None of the earlier imported photos inherited any tags created after they were imported (correct!). This could also explain why shotwell seems to lock up with thousands of imported photos, each containing a few tags. The last photo imported would apparently have thousands of tags assigned to it.
In my case with around 12,000 photos shotwell takes around 20 minutes to get started with 4gb of ram using 1 of the 4 CPUs at 100% during this time. Trying to select photos by a tag sends it back to sleep again for a similar time... Totally unusable.