Skip to content

libtracker-sparql: Avoid URN queries in DBus endpoint notifications

Carlos Garnacho requested to merge wip/carlosg/avoid-notifier-query into master

When a connection is proxied through a TrackerEndpointDBus, there are possibly 2 levels of TrackerNotifiers, one being used in the service itself to trigger the DBus signal, and another on any listening client handling those notifications.

However, both of these are doing an additional query to fetch the URN for each of the notified elements. Since we only pass ROWIDs in the DBus signal to make the signal data as compact as possible, we can avoid this query on the service side. Any client listening to notifications will perform its own URN queries anyway.

So avoid this piece of pointless busywork in the service side, and special case that the internal notifiers used by endpoints should not perform the query for URN data.

This does not make anything noticeably faster (perhaps endpoint signal emission is a bit more snappy now, if anything) as all querying and cursor handling happens lazily in a separate thread fairly detached from the rest of the machinery. However it's still less CPU cycles used overall.

Merge request reports