[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31888: 27.0.50; Segmentation fault in replace-buffer-contents

From: Eli Zaretskii
Subject: bug#31888: 27.0.50; Segmentation fault in replace-buffer-contents
Date: Fri, 29 Jun 2018 17:07:25 +0300

> Date: Mon, 25 Jun 2018 17:54:16 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden
> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]