GNOME Bugzilla – Bug 770658
gdata: Too many nfo:Equipment objects are needlessly created
Last modified: 2016-09-02 08:23:58 UTC
The nfo:Equipment handling code is a bit broken at the moment. It uses gom_tracker_sparql_connection_ensure_resource to check if a there is a nfo:Equipment with a nao:identifier matching the nmm:Photo's URN. Then it proceeds to create a separate nfo:Equipment for each photo that has camera information attached to it. This is wasteful. Instead we should do something similar to gom_tracker_utils_ensure_contact_resource and use the same strategy that Tracker uses to assign fixed URNs (urn:equipment:<make>:<model>:) to each nfo:Equipment.
Created attachment 334543 [details] [review] gdata: Don't create a separate nfo:Equipment for each photo
(In reply to Debarshi Ray from comment #0) > Instead we should do something similar to > gom_tracker_utils_ensure_contact_resource and use the same strategy that > Tracker uses to assign fixed URNs (urn:equipment:<make>:<model>:) to each > nfo:Equipment. Note that Tracker's behaviour has subtly changed recently (see bug 767472). Now it uses 'urn:equipment:<make>:<model>' (without the trailing colon) as the fixed URN for nfo:Equipments. Maybe we should fix Tracker, maybe we should just use the new scheme? Or we can query both formats before creating a new nfo:Equipment.
(In reply to Debarshi Ray from comment #2) > Note that Tracker's behaviour has subtly changed recently (see bug 767472). > Now it uses 'urn:equipment:<make>:<model>' (without the trailing colon) as > the fixed URN for nfo:Equipments. Maybe we should fix Tracker, maybe we > should just use the new scheme? Or we can query both formats before creating > a new nfo:Equipment. We decided to fix Tracker to restore the old behaviour.
I have pushed this patch so that I can release 3.20.1. Let me know if I missed anything.