Speed up re-read of exif date
authorColin Clark <colin.clark@cclark.uk>
Tue, 16 May 2017 18:56:54 +0000 (19:56 +0100)
committerColin Clark <colin.clark@cclark.uk>
Tue, 16 May 2017 18:56:54 +0000 (19:56 +0100)
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.

src/filedata.c

index 3126a4e..08e1366 100644 (file)
@@ -427,6 +427,7 @@ static FileData *file_data_new(const gchar *path_utf8, struct stat *st, gboolean
        fd->mode = st->st_mode;
        fd->ref = 1;
        fd->magick = FD_MAGICK;
        fd->mode = st->st_mode;
        fd->ref = 1;
        fd->magick = FD_MAGICK;
+       fd->exifdate = 0;
 
        if (disable_sidecars) fd->disable_grouping = TRUE;
 
 
        if (disable_sidecars) fd->disable_grouping = TRUE;
 
@@ -465,21 +466,6 @@ FileData *file_data_new_simple(const gchar *path_utf8)
        return fd;
 }
 
        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)
 void read_exif_time_data(FileData *file)
 {
        if (file->exifdate > 0)
@@ -1330,9 +1316,6 @@ static gboolean filelist_read_real(const gchar *dir_path, GList **files, GList *
                }
        if (basename_hash) file_data_basename_hash_free(basename_hash);
 
                }
        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;
 }
 
        return TRUE;
 }