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

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

bug#55481: closed (mostly nonrecursive printing [PATCH])


From: GNU bug Tracking System
Subject: bug#55481: closed (mostly nonrecursive printing [PATCH])
Date: Wed, 18 May 2022 09:08:02 +0000

Your message dated Wed, 18 May 2022 11:07:19 +0200
with message-id <102A69E9-1AA2-494F-B361-507C22C1371B@acm.org>
and subject line Re: bug#55481: mostly nonrecursive printing [PATCH]
has caused the debbugs.gnu.org bug report #55481,
regarding mostly nonrecursive printing [PATCH]
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
55481: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55481
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: mostly nonrecursive printing [PATCH] Date: Tue, 17 May 2022 15:59:16 +0200
Printing deeply nested values typically crashes Emacs by running out of C stack 
since the printer uses C recursion to traverse nested data structures. This is 
a long-standing problem that keeps turning up; see bug#52753 for one example.

The attached patch eliminates most of the recursion: conses, vectors, records, 
hash tables and char tables are now traversed without consuming C stack. This 
should cover the vast majority of objects that form deep structures.

Of note:

- Performance seems to be slightly improved (about 2.5 % faster for printing a 
long list of symbols) but that's not really the point of the patch.

- The patch does not attempt to fix the bogus #N notation for circular lists 
(bug#55395) but tries to stay bug-compatible for easier comparison.

- Some special syntax is context-conditional: (\, X) is only printed as ,X if 
surrounded by a positive number of backquote forms. It's not clear what we gain 
from this; using the special syntax for the backquote, comma and comma-at forms 
unconditionally would simplify matter without any apparent inconvenience to the 
user. Right now, the patch does not remove recursion for printing these forms.

- This patch does not address reading nested values, where a similar problem 
exists.

Attachment: print-nonrec.diff
Description: Binary data


--- End Message ---
--- Begin Message --- Subject: Re: bug#55481: mostly nonrecursive printing [PATCH] Date: Wed, 18 May 2022 11:07:19 +0200
17 maj 2022 kl. 17.48 skrev Eli Zaretskii <eliz@gnu.org>:

> Thanks, this is an important improvement, IMO.

17 maj 2022 kl. 19.41 skrev Lars Ingebrigtsen <larsi@gnus.org>:

> Yup; sounds excellent.

Thank you both! Now pushed to master.



--- End Message ---

reply via email to

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