bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25122: 24.5; function describe-variable hangs on large variables


From: Drew Adams
Subject: bug#25122: 24.5; function describe-variable hangs on large variables
Date: Sun, 12 Mar 2017 07:59:03 -0700 (PDT)

> >> Then hitting RET on "..."  would just print another X lines.
> >
> > I think like Drew that this would be annoying.
> 
> I wonder if we could just hook this into scrolling somehow?  So the
> lines would only be printed when you scroll to look at them.

I still would not like that behavior, so would would want to
opt out, personally.  If it take a minute to display *Help*
I can at least do something different (outside Emacs) during
that time.  When I'm scrolling I'm likely examining the value
as it scrolls, and I don't want to wait (scrolling in chunks
separated by delays).

E.g., I do `C-h v bookmark-alist' or `load-history' with a
large list.  I know that it will not display immediately,
so I don't grumble about that fact.  I'm free not to sit and
stare at the screen waiting for it to return.  What you
describe just chops up the wait into scrolled chunks.

> > That said, what's the reason of choosing the slower approach to compute
> > value (in a thread or not) instead of using the approach described in
> > the advice I sent here which takes 1s to compute load-history instead of
> > 3mn ? (I use this advice since one year now without any problems).
> 
> As mentioned in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21717#8,
> it breaks circularity.  Try describing this variable:
> 
>   (defvar circular-list
>     (let ((l (number-sequence 1 100))) (setcdr (last l) l) l) "")
> 
> We could probably achieve something similar without breaking circular
> printing by not calling indent-sexp on the full list, but 1s is longer
> than "instant" anyway (which is about 50ms or less) which is why I'm
> exploring other options.

1 sec is not a problem, IMO.  0.7 sec is a typical Emacs
`sit-for' value, i.e., something that, yes, allows time to
notice the change/wait, but it is not so long that it
becomes annoying.

(It would be annoying if it happened for all or most *Help*
displays, but printing large values is the exception.)





reply via email to

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