all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: joaotavora@gmail.com
Cc: Alan Mackenzie <acm@muc.de>,
	31888@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	k.michal@zoho.com
Subject: bug#31888: 27.0.50; Segmentation fault in replace-buffer-contents
Date: Fri, 29 Jun 2018 17:07:25 +0300	[thread overview]
Message-ID: <83efgpofdu.fsf@gnu.org> (raw)
In-Reply-To: <83muvisyqv.fsf@gnu.org> (message from Eli Zaretskii on Mon, 25 Jun 2018 17:54:16 +0300)

> Date: Mon, 25 Jun 2018 17:54:16 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 31888@debbugs.gnu.org, k.michal@zoho.com
> 
> However, I'm working on profiling this command with better
> granularity, so maybe I will have additional ideas for speeding it up.

As usual, good profiling tools indicate that the problem was in
entirely unexpected places.

I've now pushed changes that make replace-buffer-contents run between
7 and 10 times faster in the use case that was posted at the beginning
of this bug report: it now finishes in 12 to 22 seconds instead of
more than 2 minutes.  Please see if these changes have any significant
effect in your case.

One aspect of the changes for which I'd like some feedback (and CC
Stefan and Alan) is that the modified code no longer calls the
modification hooks for each small insertion or deletion that the
optimized replacement script calls; instead, we call the modification
hooks just once before the series of changes and once after them.
Doing this speeds up the function by a factor of 2, so if we give up
that twofold speedup, we should do that only for a very good reason.





  parent reply	other threads:[~2018-06-29 14:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-17 13:12 bug#31888: 27.0.50; Segmentation fault in replace-buffer-contents Michał Kondraciuk
2018-06-18 21:50 ` bug#31888: Milan Stanojević
2018-06-22 13:03 ` bug#31888: 27.0.50; Segmentation fault in replace-buffer-contents Eli Zaretskii
2018-06-23 11:15   ` Eli Zaretskii
2018-06-25 10:49     ` João Távora
2018-06-25 14:54       ` Eli Zaretskii
2018-06-25 15:55         ` João Távora
2018-06-29 14:07         ` Eli Zaretskii [this message]
2018-06-29 14:51           ` Stefan Monnier
2018-06-29 15:23             ` Eli Zaretskii
2018-06-29 16:57               ` Stefan Monnier
2018-06-29 17:34                 ` Eli Zaretskii
2018-06-29 17:39                   ` Eli Zaretskii
2018-06-29 19:04                     ` João Távora
2018-06-29 19:09                       ` Eli Zaretskii
2018-06-30  8:33                         ` João Távora
2018-06-30 11:03                           ` Eli Zaretskii
2018-06-30 13:28                             ` João Távora
2018-06-29 20:40                   ` Stefan Monnier
2018-06-30  7:44                     ` Eli Zaretskii
2018-06-30 12:54                       ` Stefan Monnier
2018-06-30 13:51                         ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=83efgpofdu.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=31888@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=joaotavora@gmail.com \
    --cc=k.michal@zoho.com \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.