changeset 2479:d9c7bc8c0979

Speed up re-read of exif date Remove unnecessary resets of exif date which cause re-reads of exif date to be slow. The initial read of exif date is unfortunately still slow.
author Colin Clark <colin.clark@cclark.uk>
date Tue, 16 May 2017 19:56:54 +0100
parents b3462ee88422
children 499e1396eed2
files src/filedata.c
diffstat 1 files changed, 1 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/filedata.c	Sun May 14 21:57:53 2017 +0100
+++ b/src/filedata.c	Tue May 16 19:56:54 2017 +0100
@@ -427,6 +427,7 @@
 	fd->mode = st->st_mode;
 	fd->ref = 1;
 	fd->magick = FD_MAGICK;
+	fd->exifdate = 0;
 
 	if (disable_sidecars) fd->disable_grouping = TRUE;
 
@@ -465,21 +466,6 @@
 	return fd;
 }
 
-void init_exif_time_data(GList *files)
-{
-	FileData *file;
-	DEBUG_1("%s init_exif_time_data: ...", get_exec_time());
-	while (files)
-		{
-		file = files->data;
-
-		if (file)
-			file->exifdate = 0;
-
-		files = files->next;
-		}
-}
-
 void read_exif_time_data(FileData *file)
 {
 	if (file->exifdate > 0)
@@ -1330,9 +1316,6 @@
 		}
 	if (basename_hash) file_data_basename_hash_free(basename_hash);
 
-	// Call a separate function to initialize the exif datestamps for the found files..
-	if (files) init_exif_time_data(*files);
-
 	return TRUE;
 }