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: Eli Zaretskii
Subject: bug#51523: 29.0.50; gnus-mime-view-part-externally very slow
Date: Wed, 03 Nov 2021 15:06:32 +0200

> Date: Wed, 03 Nov 2021 10:45:35 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: larsi@gnus.org, 51523@debbugs.gnu.org, monnier@iro.umontreal.ca
> 
> >> 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.

The function is buggy without that, so much so that I tend to remove
it from Emacs.

> 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.

This isn't a time critical function, so 0.1 msec per call is nothing
to be afraid of.





reply via email to

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