[tracker] Fixes: NB#109046, Tracker is slow to index all the images in ...



commit 51bbab842e2e2206863cefa43b31022e3cea0919
Author: Martyn Russell <martyn imendio com>
Date:   Wed Apr 15 15:16:25 2009 +0100

    Fixes: NB#109046, Tracker is slow to index all the images in ...
---
 src/libtracker-common/tracker-file-utils.c   |   16 ----------------
 src/tracker-extract/tracker-extract-mp3.c    |    8 --------
 src/tracker-extract/tracker-extract-vorbis.c |    4 ----
 3 files changed, 0 insertions(+), 28 deletions(-)

diff --git a/src/libtracker-common/tracker-file-utils.c b/src/libtracker-common/tracker-file-utils.c
index 2cd0be3..569a201 100644
--- a/src/libtracker-common/tracker-file-utils.c
+++ b/src/libtracker-common/tracker-file-utils.c
@@ -70,18 +70,8 @@ tracker_file_open (const gchar *uri,
 			fcntl (fd, F_SETFL, flags | O_NOATIME);
 		}
 #endif
-
-#ifdef HAVE_POSIX_FADVISE
-		if (sequential_access) {
-			posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
-		} else {
-			posix_fadvise (fd, 0, 0, POSIX_FADV_RANDOM);
-		}
-#endif
 	}
 	
-	/* FIXME: Do nothing with posix_fadvise() for non-readonly operations */
-
 	return file;
 }
 
@@ -91,12 +81,6 @@ tracker_file_close (FILE     *file,
 {
 	g_return_if_fail (file != NULL);
 
-#ifdef HAVE_POSIX_FADVISE
-	if (!need_again_soon) {
-		posix_fadvise (fileno (file), 0, 0, POSIX_FADV_DONTNEED);
-	}
-#endif
-
 	fclose (file);
 }
 
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 9fec600..9525a32 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -1540,10 +1540,6 @@ extract_mp3 (const gchar *filename,
 	}
 #endif
 
-#ifdef HAVE_POSIX_FADVISE
-	posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
-#endif
-	
 #ifndef G_OS_WIN32
 	/* We don't use GLib's mmap because size can not be specified */
 	buffer = mmap (NULL, 
@@ -1554,10 +1550,6 @@ extract_mp3 (const gchar *filename,
 		       0);
 #endif
 
-#ifdef HAVE_POSIX_FADVISE
-	posix_fadvise (fd, 0, 0, POSIX_FADV_DONTNEED);
-#endif
-
 	close (fd);
 
 	if (buffer == NULL || buffer == (void*) -1) {
diff --git a/src/tracker-extract/tracker-extract-vorbis.c b/src/tracker-extract/tracker-extract-vorbis.c
index ab84eb0..f873850 100644
--- a/src/tracker-extract/tracker-extract-vorbis.c
+++ b/src/tracker-extract/tracker-extract-vorbis.c
@@ -177,10 +177,6 @@ extract_vorbis (const char *filename,
                 g_hash_table_insert (metadata, g_strdup ("Audio.Codec"), g_strdup ("vorbis"));
         }
 
-#ifdef HAVE_POSIX_FADVISE
-        posix_fadvise (fileno (f), 0, 0, POSIX_FADV_DONTNEED);
-#endif
-
         /* NOTE: This calls fclose on the file */
 	ov_clear (&vf);
 }



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