Subject: bug#43016: replace-region-contents takes a lot of time when called from json-pretty-print-buffer

From: Tassilo Horn <[email-masked]>
Date: Tue, 25 Aug 2020 19:30:26 +0200

Paul Eggert <[email-masked]> writes:

> by installing the first attached patch into Emacs master, which fixes
> the problem (at least for me). I installed the second attached patch
> into Emacs master to fix some other minor issues I noticed while in
> the neighborhood.

Seems to work fine for me too with all three files of this report and
the large one from bug#42931.  It seems like the early abort will now
happen shortly after MAX-SECS bounds.

Bye,
Tassilo