Skip to content
Commit d7c478b7 authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

libtracker-sparql: Avoid URN queries in DBus endpoint notifications

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.
parent 32b8449f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment