all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Noam Postavsky <npostavs@gmail.com>
Cc: 12747@debbugs.gnu.org, Oleksandr Gavenko <gavenkoa@gmail.com>
Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL).
Date: Thu, 12 Jul 2018 09:28:57 -0400	[thread overview]
Message-ID: <jwvr2k8fuwo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87601lb8lc.fsf@gmail.com> (Noam Postavsky's message of "Wed, 11 Jul 2018 20:28:47 -0400")

> I think you've implemented this now [1: f8b1e40fb6], though not quite in
> the way you describe (I don't see any timers).

Indeed, thanks.

> This reminds that magit users found binding write-region-inhibit-fsync
> around smerge-refine-regions made a noticable performance difference.
> So should we add something like this?

Sounds good, yes (tho I'm surprised it'd make much of a difference,
when your /tmp is on some kind of tmpfs).  If you can add a URL
pointing to the discussion where they found the noticable performance
difference, that'd be even better.


        Stefan


> From e5f3cf973c37ddaca92cc819d95d896ca0d869c7 Mon Sep 17 00:00:00 2001
> From: Noam Postavsky <npostavs@gmail.com>
> Date: Wed, 11 Jul 2018 20:13:25 -0400
> Subject: [PATCH] Speed up smerge-refine-regions by avoiding fsync
>
> * lisp/vc/smerge-mode.el (smerge-refine-regions): Bind
> write-region-inhibit-fsync to t.
> ---
>  lisp/vc/smerge-mode.el | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
> index cb51fbab8e..cb9880c80d 100644
> --- a/lisp/vc/smerge-mode.el
> +++ b/lisp/vc/smerge-mode.el
> @@ -1075,9 +1075,10 @@ smerge-refine-regions
>            (if smerge-refine-weight-hack (make-hash-table :test #'equal))))
>      (unless (markerp beg1) (setq beg1 (copy-marker beg1)))
>      (unless (markerp beg2) (setq beg2 (copy-marker beg2)))
> -    ;; Chop up regions into smaller elements and save into files.
> -    (smerge--refine-chopup-region beg1 end1 file1 preproc)
> -    (smerge--refine-chopup-region beg2 end2 file2 preproc)
> +    (let ((write-region-inhibit-fsync t)) ; Don't fsync temp files.
> +      ;; Chop up regions into smaller elements and save into files.
> +      (smerge--refine-chopup-region beg1 end1 file1 preproc)
> +      (smerge--refine-chopup-region beg2 end2 file2 preproc))
>  
>      ;; Call diff on those files.
>      (unwind-protect





  reply	other threads:[~2018-07-12 13:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28 12:13 bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL) Oleksandr Gavenko
2012-10-28 13:54 ` Stefan Monnier
2012-10-28 19:38   ` Oleksandr Gavenko
2012-10-28 20:29     ` Stefan Monnier
2018-07-12  0:28   ` Noam Postavsky
2018-07-12 13:28     ` Stefan Monnier [this message]
2018-07-12 19:54       ` Noam Postavsky
2018-07-12 20:17         ` Stefan Monnier
2018-07-13  1:47       ` Noam Postavsky

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=jwvr2k8fuwo.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=12747@debbugs.gnu.org \
    --cc=gavenkoa@gmail.com \
    --cc=npostavs@gmail.com \
    /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.