[tracker] tracker-extract-playlist: Limit playlists to 1000 entries



commit 0e050e796dacc975d795ce7316a2509f217d8d03
Author: JÃrg Billeter <j bitron ch>
Date:   Tue Jul 19 11:15:08 2011 +0200

    tracker-extract-playlist: Limit playlists to 1000 entries
    
    Fixes NB#269986.

 src/tracker-extract/tracker-extract-playlist.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-playlist.c b/src/tracker-extract/tracker-extract-playlist.c
index 8e4340c..4bcb1b1 100644
--- a/src/tracker-extract/tracker-extract-playlist.c
+++ b/src/tracker-extract/tracker-extract-playlist.c
@@ -61,6 +61,11 @@ entry_parsed (TotemPlParser *parser, const gchar *to_uri, GHashTable *to_metadat
 	data = (PlaylistMetadata *)user_data;
 	data->track_counter++;
 
+	if (data->track_counter > 1000) {
+		/* limit playlists to 1000 entries for query performance reasons */
+		return;
+	}
+
 	if (data->track_counter == 1) {
 		/* first track, predicate needed */
 		tracker_sparql_builder_predicate (data->metadata, "nfo:hasMediaFileListEntry");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]