Subject: bug#61394: 30.0.50; [PATCH] Image-dired thumb name based on content

From: Stefan Kangas <[email-masked]>
Date: Wed, 15 Feb 2023 06:19:02 -0800

Manuel Giraud <[email-masked]> writes:

> The performance impact is important.  Here are the results from a list
> of images of mine:
> --8<---------------cut here---------------start------------->8---
> (length *images*) -> 3664
>
> (benchmark-run-compiled 10 (dolist (im *images*) (sha1 im)))
>  -> (0.367976492 1 0.2809483390000196)
>
> (benchmark-run-compiled 10 (dolist (im *images*) (image-dired-contents-sha1 im)))
>  -> (72.115512605 84 26.079076938000014)
> --8<---------------cut here---------------end--------------->8---

Thanks.  That's a slowdown by a factor close to 100, so while I think
the feature sounds useful, it should indeed be made optional.

> Maybe we could have this in another option for
> `image-dired-thumbnail-storage'?

I think 'image-dired-thumbnail-storage' is already complicated enough,
and I'd rather not complicate it further.

> What do you think of 'image-dired-contents?

Hmm, it sounds a bit too nondescript.  How about something like
'image-dired-thumbnail-naming'?