[tracker] TrackerEvolutionPlugin: Send sparql updates without waiting for reply.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] TrackerEvolutionPlugin: Send sparql updates without waiting for reply.
- Date: Thu, 22 Oct 2009 13:02:34 +0000 (UTC)
commit 5da9b6e90accb4a3f0c5371f646b5775b70d76e5
Author: Carlos Garnacho <carlos lanedo com>
Date: Thu Oct 22 14:52:50 2009 +0200
TrackerEvolutionPlugin: Send sparql updates without waiting for reply.
The number of DBus messages send may be huge, and it may take long for them to
be answered, clobbering the pending calls hashtable. This fixes some random
OOM observed when sending ~30K messages.
src/plugins/evolution/tracker-evolution-plugin.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/evolution/tracker-evolution-plugin.c b/src/plugins/evolution/tracker-evolution-plugin.c
index 47bb378..8eb7b86 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.c
+++ b/src/plugins/evolution/tracker-evolution-plugin.c
@@ -325,9 +325,10 @@ send_sparql_update (TrackerEvolutionPlugin *self, const gchar *sparql)
TrackerEvolutionPluginPrivate *priv = TRACKER_EVOLUTION_PLUGIN_GET_PRIVATE (self);
if (priv->client) {
- tracker_resources_batch_sparql_update_async (priv->client, sparql,
- on_replied,
- g_object_ref (self));
+ dbus_g_proxy_call_no_reply (priv->client->proxy_resources,
+ "SparqlUpdate",
+ G_TYPE_STRING, sparql,
+ G_TYPE_INVALID);
}
}
@@ -343,12 +344,11 @@ send_sparql_commit (TrackerEvolutionPlugin *self, gboolean update)
"WHERE { <" DATASOURCE_URN "> a nie:InformationElement ; nie:contentLastModified ?d } \n"
"INSERT { <" DATASOURCE_URN "> nie:contentLastModified \"%s\" }",
date_s);
- g_free (date_s);
- tracker_resources_batch_sparql_update_async (priv->client, update,
- on_replied,
- g_object_ref (self));
+
+ send_sparql_update (self, update);
g_free (update);
+ g_free (date_s);
}
tracker_resources_batch_commit_async (priv->client, on_replied,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]