[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36566: 27.0.50; debug is sometimes horribly slow
From: |
Noam Postavsky |
Subject: |
bug#36566: 27.0.50; debug is sometimes horribly slow |
Date: |
Wed, 31 Jul 2019 21:05:01 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) |
Gemini Lasswell <gazally@runbox.com> writes:
> The third patch attached below fixes that by adding a macro to
> cl-print.el to wrap the printing of all the simple things with
> let-bindings of print-circle and print-gensym to nil.
> Patch #3 has the advantage of being straightforward logically and not
> breaking anything which doesn't use cl-prin1, but it undoubtedly also
> slows down cl-prin1 in the probably more common case that print-gensym
> and print-circle are both nil. There are other ways to fix this, such
> as by adding a new entry point in print.c for printing simple strings,
> or by modifying the logic in print_preprocess to not create a hash table
> if the top-level object is a string with no properties.
This last idea sounds like a straightforward win to me, with no obvious
drawbacks. I mean, no point in allocating a hash table if we can
cheaply detect it will never be used, right?