|
From: | Gregory Heytings |
Subject: | bug#51523: 29.0.50; gnus-mime-view-part-externally very slow |
Date: | Wed, 03 Nov 2021 10:45:35 +0000 |
I attach an improved version of file-has-changed-p. Following Eli's suggestion, it records the file size together with its timestamp.What about expand-file-name or file-truename? That problem still exists in this new patch, AFAICT.
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. I tend to agree with them; after all, the filename is only used as a key in the hash table, and file-attributes finds the "right" file anyway.
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.
[Prev in Thread] | Current Thread | [Next in Thread] |