From: Colin Clark Date: Tue, 16 May 2017 18:56:54 +0000 (+0100) Subject: Speed up re-read of exif date X-Git-Tag: v1.4~181 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=d0224edc8344bedbb90c38e730f719eb1402d263 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. --- diff --git a/src/filedata.c b/src/filedata.c index 3126a4ea..08e13668 100644 --- a/src/filedata.c +++ b/src/filedata.c @@ -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->exifdate = 0; if (disable_sidecars) fd->disable_grouping = TRUE; @@ -465,21 +466,6 @@ FileData *file_data_new_simple(const gchar *path_utf8) 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 @@ static gboolean filelist_read_real(const gchar *dir_path, GList **files, GList * } 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; }