GNU bug report logs -
#40407
[PATCH] slow ENCODE_FILE and DECODE_FILE
Previous Next
Reported by: Mattias Engdegård <mattiase <at> acm.org>
Date: Fri, 3 Apr 2020 16:11:01 UTC
Severity: normal
Tags: patch
Done: Mattias Engdegård <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 40407 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
4 apr. 2020 kl. 11.26 skrev Eli Zaretskii <eliz <at> gnu.org>:
> DECODE_FILE is called because the file name in question starts with a
> "~"? Otherwise, I don't think I understand why would expand-file-name
> need to decode a file name.
Maybe it's because default-directory started with a tilde. It doesn't really matter; it's a common case, and the profiler tells us as much.
> IME, the cases where we can safely assume it's OK to return the same
> string are actually very rare. It is no accident that you saw so few
> calls of these functions where we use that optional behavior.
This does not mean that the remaining 179 calls require a copy; they just use the default value of the parameter.
> Neither, IMO. Again, it's a separate problem, and let's keep our
> sights squarely on the original issue you wanted to fix. Let's tackle
> the NOCOPY issue in a separate discussion, OK?
Thank you, a separate bug for it is fine.
Here is a revised patch which takes the nocopy parameter into account (in its inverted sense). Obviously it needs to be adapted if the nocopy inversion is dealt with first; the two bugs do not commute.
[0001-Avoid-expensive-recoding-for-ASCII-identity-cases-bu.patch (application/octet-stream, attachment)]
This bug report was last modified 5 years and 91 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.