GNU bug report logs -
#21528
25.0.50; gud tries to guess what file we're debugging, which can take a long time
Previous Next
Reported by: Dima Kogan <dima <at> secretsauce.net>
Date: Mon, 21 Sep 2015 02:51:02 UTC
Severity: minor
Found in version 25.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 21528 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> If I'm doing remote debugging with tramp and the current directory
>> has many files in it, then emacs can sit there for a very long time
>> before opening the minibuffer, while it looks at all the files in the
>> remote directory. I think this delay changes this behavior from
>> not-useful to harmful, and I think it should be removed. Thoughts?
>
> Removing it altogether, based on your personal and very specific use
> case, would be too drastic, IMO.
Completely agree that my opinion should play only a small role. Let me
push that argument a tiny bit more, and I'll leave it alone.
The current heuristic assumes that both
1. The program we're debugging lives in the current directory
2. The program is executable
Both of those could be true, but probably not all that often. Especially
the "program is executable part" easily fails for interpreted languages.
OK. Now for better solutions. The current logic is:
(dolist (f (directory-files default-directory) file)
(if (and (file-executable-p f)
(not (file-directory-p f))
(or (not file)
(file-newer-than-file-p f file)))
(setq file f)))
With tramp each of the file system calls above are a separate tramp
call, and the overhead becomes very significant. I don't know enough
about tramp to know if consolidating these would be possible.
The heuristic could be more useful be filtering on file extensions. So
for instance looking at only .py files for pdb could be good, but this
could be wrong, and wouldn't really speed up the above code.
Finally as currently written, perldb doesn't run that code at all, but
simply tries to debug the script in the current buffer. This could easly
apply to python too, if we decide.
This bug report was last modified 3 years and 118 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.