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: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: ljell <laszlomail <at> protonmail.com>, "43016 <at> debbugs.gnu.org" <43016 <at> debbugs.gnu.org>, Paul Eggert <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 19:21:24 +0200
Tassilo Horn <tsdh <at> gnu.org> writes:

> That would be sad because except for the performance in some
> cases, it's very nice. :-(

It is indeed very nice.  My guess is that most of the usages of the
function is for shortish JSON structures.  Perhaps we could just
introduce an arbitrary switchover between using replace-region-contents
and plain replacing -- like a hundred K or something?  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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.