bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51523: 29.0.50; gnus-mime-view-part-externally very slow


From: Stefan Monnier
Subject: bug#51523: 29.0.50; gnus-mime-view-part-externally very slow
Date: Wed, 03 Nov 2021 08:02:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> I don't know what I should do here.  Both Stefan and Lars think (IIUC) that
> it's okay to use the filename as is.

No: the hash table should be indexed by absolute file names.
Anything else will lead to bugs.
There are various ways to get those names to be absolute, with tradeoffs.

> Using expand-file-name or file-truename also makes that function much
> slower: (benchmark-run 100000 (file-has-changed-p "~/.profile")) takes (on
> my computer) 2 seconds in its current version, 3 seconds with
> expand-file-name, and... 10 seconds with file-truename.

In the sample code I sent around this, I used
(unless (file-name-absolute-p file) (setq file (expand-file-name file)))
in part to avoid the cost of expand-file-name.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]