GNU bug report logs - #43016
replace-region-contents takes a lot of time when called from json-pretty-print-buffer

Previous Next

Package: emacs;

Reported by: ljell <laszlomail <at> protonmail.com>

Date: Mon, 24 Aug 2020 09:26:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: laszlomail <at> protonmail.com, 43016 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Subject: bug#43016: replace-region-contents takes a lot of time when called from json-pretty-print-buffer
Date: Mon, 24 Aug 2020 20:27:30 +0300
> From: Tassilo Horn <tsdh <at> gnu.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,
> 	"43016 <at> debbugs.gnu.org" <43016 <at> debbugs.gnu.org>,
> 	Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Mon, 24 Aug 2020 19:14:50 +0200
> 
> So basically I'd say the problem is in gnulib's compareseq.  If it can't
> be fixed there, I see no other possibility than to stop using
> replace-buffer/region-contents in json.el (and wherever it might also be
> used).  That would be sad because except for the performance in some
> cases, it's very nice. :-(

Could we decide whether to use replace-* functions dynamically, based
on the size of the region/buffer being prettified?

Btw, there's another problem with compareseq, see bug#42931.  I guess
we need to add another criterion for early_abort, based on depth of
recursion?

Thanks.




This bug report was last modified 4 years and 355 days ago.

Previous Next


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