diff options
author | Naïm Favier <n@monade.li> | 2024-06-02 15:31:33 +0200 |
---|---|---|
committer | Birte Friesel <derf@chaosdorf.de> | 2024-06-30 11:40:06 +0200 |
commit | 08b269d172acc2b4cb9b9336e2cd8097d89ef6a7 (patch) | |
tree | ece7aca6a7eccf8ca37b863b6ce2dd6f4abf2402 /src/list.c | |
parent | 186dab662b50e7aa1e15674c468d35810a691409 (diff) |
cache stat(2) calls
When the user requests sorting by size or mtime, do a "soft preload" of
the file list that only calls stat(2) without loading images.
This avoids calling stat(2) repeatedly on the same files when sorting
the file list, and achieves faster startup on slow filesystems.
Diffstat (limited to 'src/list.c')
-rw-r--r-- | src/list.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -50,7 +50,7 @@ void init_list_mode(void) file->info->height, format_size(file->info->pixels)); printf("\t%s\t%c\t%s\n", - format_size(file->info->size), + format_size(file->size), file->info->has_alpha ? 'X' : '-', file->filename); } |