GNU bug report logs - #25122
24.5; function describe-variable hangs on large variables

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Tue, 6 Dec 2016 02:21:02 UTC

Severity: minor

Tags: fixed, patch

Merged with 13439, 21717

Found in versions 24.4.50, 24.5

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 25122 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>, Boruch Baum <boruch_baum <at> gmx.com>
Subject: bug#25122: 24.5; function describe-variable hangs on large variables
Date: Sun, 12 Mar 2017 10:15:21 -0400
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> npostavs <at> users.sourceforge.net writes:
>
>> and suspend it after printing X lines.
>
> Instead just print something like "Computing foo value ..." and let finish
> the thread, letting user reading and moving cursor in docstring while it
> finishes, once done save-excursion and send message "Computing foo value
> done".

Threads aren't truly parallel.  The user can't do anything while the
thread is running.

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

>
> 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)
      "A circular list that has problems with (mapc 'pp val).")

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.




This bug report was last modified 8 years and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.