unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: ljell <laszlomail@protonmail.com>, Tassilo Horn <tsdh@gnu.org>,
	"43016@debbugs.gnu.org" <43016@debbugs.gnu.org>,
	Paul Eggert <eggert@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:25:53 +0200	[thread overview]
Message-ID: <CAArVCkRDF_=1NoTJvNCxwL2Jcz4g+6acug0+7n-k-AHpaf27gw@mail.gmail.com> (raw)
In-Reply-To: <87pn7g6ju3.fsf@gnus.org>

Am Mo., 24. Aug. 2020 um 19:22 Uhr schrieb Lars Ingebrigtsen <larsi@gnus.org>:
>
> Tassilo Horn <tsdh@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?
>


That's basically what the MAX-SECS and MAX-COST parameters are
supposed to do. We should definitely fix compareseq so that it takes
these costs into account more strictly (e.g. checking at least once
per million iterations or so).





  reply	other threads:[~2020-08-24 17:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24  8:25 bug#43016: replace-region-contents takes a lot of time when called from json-pretty-print-buffer ljell via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-24 10:37 ` Eli Zaretskii
2020-08-24 12:13   ` ljell via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-24 12:29     ` ljell via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-24 17:14     ` Tassilo Horn
2020-08-24 17:21       ` Lars Ingebrigtsen
2020-08-24 17:25         ` Philipp Stephani [this message]
2020-08-24 17:27       ` Eli Zaretskii
2020-08-24 19:15         ` Tassilo Horn
2020-08-24 19:36           ` Eli Zaretskii
2020-08-24 23:35       ` Paul Eggert
2020-08-25  6:10         ` Eli Zaretskii
2020-08-25 18:26           ` Paul Eggert
2020-08-25 17:30         ` Tassilo Horn
2020-08-25 18:19           ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkRDF_=1NoTJvNCxwL2Jcz4g+6acug0+7n-k-AHpaf27gw@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=43016@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=larsi@gnus.org \
    --cc=laszlomail@protonmail.com \
    --cc=tsdh@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).