[tracker/rss-enclosures] NFO, libtracker-miner: Major performance improvement for crawler
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] NFO, libtracker-miner: Major performance improvement for crawler
- Date: Mon, 3 May 2010 00:48:37 +0000 (UTC)
commit 51ff8f9976698d9fc4b644a97f0204497200df62
Author: Philip Van Hoof <philip codeminded be>
Date: Fri Apr 30 16:10:37 2010 +0200
NFO, libtracker-miner: Major performance improvement for crawler
data/ontologies/33-nfo.ontology | 3 ++-
src/libtracker-miner/tracker-miner-fs.c | 10 +++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/data/ontologies/33-nfo.ontology b/data/ontologies/33-nfo.ontology
index 016941e..a74d132 100644
--- a/data/ontologies/33-nfo.ontology
+++ b/data/ontologies/33-nfo.ontology
@@ -12,7 +12,7 @@
nfo: a tracker:Namespace, tracker:Ontology ;
tracker:prefix "nfo" ;
- nao:lastModified "2010-04-22T13:12:00Z" .
+ nao:lastModified "2010-04-30T16:12:00Z" .
nfo:Document a rdfs:Class ;
rdfs:label "Document" ;
@@ -330,6 +330,7 @@ nfo:belongsToContainer a rdf:Property ;
rdfs:subPropertyOf nie:isPartOf ;
nrl:maxCardinality 1 ;
rdfs:domain nie:DataObject ;
+ tracker:indexed true ;
rdfs:range nfo:DataContainer .
nfo:aspectRatio a rdf:Property ;
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 419e6f4..9127886 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2182,11 +2182,11 @@ ensure_mtime_cache (TrackerMinerFS *fs,
g_debug ("Generating mtime cache for folder: %s", uri);
- query = g_strdup_printf ("SELECT ?uri nfo:fileLastModified (?u) { "
- " ?u nie:url ?uri . "
- " FILTER (tracker:uri-is-parent (\"%s\", ?uri)) "
- "}",
- uri);
+ query = g_strdup_printf ("SELECT ?url ?last { ?u nfo:belongsToContainer ?p ; "
+ "nie:url ?url ; "
+ "nfo:fileLastModified ?last . "
+ "?p nie:url '%s' }", uri);
+
g_free (uri);
data.main_loop = g_main_loop_new (NULL, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]