Commit 01dbf2a3 authored by Noam Postavsky's avatar Noam Postavsky

Speed up smerge-refine-regions by avoiding fsync

* lisp/vc/smerge-mode.el (smerge-refine-regions): Bind
write-region-inhibit-fsync to t.  This was reported in
https://github.com/magit/magit/pull/2834 to give a noticable speedup.
parent 1222ff52
......@@ -1075,9 +1075,10 @@ used to replace chars to try and eliminate some spurious differences."
(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 (Bug#12747).
;; 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment