[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36566: 27.0.50; debug is sometimes horribly slow
From: |
Michael Heerdegen |
Subject: |
bug#36566: 27.0.50; debug is sometimes horribly slow |
Date: |
Mon, 15 Jul 2019 04:05:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Gemini Lasswell <gazally@runbox.com> writes:
> The easy fix for you for today is to set backtrace-line-length to 100 or
> less, which will make the initial values of print-length and print-level
> so low that little reprinting will be done. Then use
> backtrace-expand-ellipsis (bound to "."), with or without C-u, on the
> lines where you want to see the full data structure. And try "+" and
> "-" if you haven't already.
Ok, will have a look at these commands. I've simply turned print-gensym
off for now in the debugger.
> I'll experiment with tweaking the heuristic to reduce the amount of
> reprinting it does, and let you know what I come up with.
Ok, great, tia. Dunno if it would be worth it to optimize this test
printing, e.g. by turning print-gensym temporarily off.
> > BTW, extra points if the debugger provided commands/ a menu to tune such
> > settings (like printing variables) live when using it.
>
> There is such a command for print-circle (bound to "#") and it would be
> easy to add one for print-gensym, although I could use a keybinding
> suggestion.
You could use ":". Or "# #" for print-circle and "# :" for print-gensym
(i.e. make "#" a prefix command). This is inspired by print-circle
references looking like #N# and print syntax of gensyms looking like
#:NAME.
In any case, _please_ add both to the menu for discoverability, maybe
also the "global" version (i.e. 4 entries in sum).
BTW, when I eval this
(let ((x '#1=(1 . #1#)))
(debug)
(cons x x))
I get a backtrace like
Debugger entered: nil
(let ((x '(1 . #6))) (debug) (cons x x))
eval((let ((x '(1 . #7))) (debug) (cons x x)) t)
whereby when I hit C-u # all references get number 1, or start from 1
for every frame:
Debugger entered: nil
(let ((x '#1=(1 . #1#))) (debug) (cons x x))
eval((let ((x '#1=(1 . #1#))) (debug) (cons x x)) t)
Just a minor inconvenience, though.
Anyway, thanks for improving the debugger in this way so far, this is
very useful.
Michael.