From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61394: 30.0.50; [PATCH] Image-dired thumb name based on content Date: Sun, 12 Feb 2023 22:53:40 +0100 Message-ID: <877cwmo8ij.fsf@ledu-giraud.fr> References: <874jruy7xx.fsf@ledu-giraud.fr> <87ttztk0yw.fsf@tcd.ie> <87v8k9s6j9.fsf@ledu-giraud.fr> <83ilg8jzti.fsf@gnu.org> <87k00oo03r.fsf@ledu-giraud.fr> <838rh4jlsq.fsf@gnu.org> <87bklzol8n.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24055"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: contovob@tcd.ie, Eli Zaretskii , 61394@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 12 22:54:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRKIb-000634-KY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Feb 2023 22:54:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRKIP-0001pD-Ru; Sun, 12 Feb 2023 16:54:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRKIN-0001p2-8n for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2023 16:54:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRKIM-0003f3-Vv for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2023 16:54:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRKIM-0006R1-CM for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2023 16:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Feb 2023 21:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 61394-submit@debbugs.gnu.org id=B61394.167623882524709 (code B ref 61394); Sun, 12 Feb 2023 21:54:02 +0000 Original-Received: (at 61394) by debbugs.gnu.org; 12 Feb 2023 21:53:45 +0000 Original-Received: from localhost ([127.0.0.1]:47087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRKI5-0006QT-7k for submit@debbugs.gnu.org; Sun, 12 Feb 2023 16:53:45 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:15689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRKI3-0006QJ-34 for 61394@debbugs.gnu.org; Sun, 12 Feb 2023 16:53:44 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=Fv5MO1cG WNh5JhzjrKooY/j5RyMThVXmir3qA/3iR2c=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=vEa2GEgh4S0dNr8JIdL7OkVgxdeoUt KB9nKY/JA/xxaF6zn9atzYSsFU7t5ulWwcgsnGa3DYHqBLDxn9gL4FAw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=Fv5MO1cGWNh5Jhzj rKooY/j5RyMThVXmir3qA/3iR2c=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=DA0z9YVSTFNRfDfhKGZjcrEAzqFh0I9RKQfWLd C3PIu0GC4AfL5y3ZfXxjXA448iaDYv4YFGzxMzDw940+W+tgjoWg9VI+UpDMKrkTbPIGKK yjV9Ovwv/6lFRSddq7DrJtqiwKCGpOLZ8Rp8FzgDdIxnBVrta0d6+30l7CA6pwO64BHJs+ fT7DlGuky39xdJNZKolWwjin67Q0/7VUIlXVVeaNm7R31dLgc9nLMMaRiGEHItbNX4icsY FBbYC9vVBMgFJF3MF5M8jVcoEZdLQ1lxtDeHONbQ4UdcSSxkK6ui/ex89pafTMBcufr6FS NvZ+1MLYoVkzPq4nEeaaB5bg== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id a8fc65d6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 12 Feb 2023 22:53:41 +0100 (CET) In-Reply-To: (Stefan Kangas's message of "Sun, 12 Feb 2023 03:02:25 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255445 Archived-At: Stefan Kangas writes: > Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of > text editors" writes: > >> So, here is another version of the patch. > > What is the performance impact of this? Could we see some benchmarks? 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--- OTOH, using image-dired on a directory of 245 photos before and after this patch I cannot feel any difference (after the thumbnails are done of course). > I routinely open folders with hundreds of files that are several > megabytes each, so I think this is the type of benchmark I would be > interested in. This is common when working with images from a digital > camera. > > If it has too much of a performance impact, we could consider making it > optional (and disable it by default). Maybe we could have this in another option for `image-dired-thumbnail-storage'? What do you think of 'image-dired-contents? -- Manuel Giraud