From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#12747: 23.4; diff-auto-refine-mode process only last hunk in diff (must ALL). Date: Thu, 12 Jul 2018 16:17:18 -0400 Message-ID: References: <87y5iqbxqn.fsf@gavenkoa.example.com> <87601lb8lc.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531426576 6943 195.159.176.226 (12 Jul 2018 20:16:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 12 Jul 2018 20:16:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 12747@debbugs.gnu.org, Oleksandr Gavenko To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 12 22:16:12 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdi0a-0001hu-0u for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Jul 2018 22:16:12 +0200 Original-Received: from localhost ([::1]:33908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdi2h-0003Bt-58 for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Jul 2018 16:18:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdi2P-00036L-H6 for bug-gnu-emacs@gnu.org; Thu, 12 Jul 2018 16:18:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdi2M-0007uf-Bz for bug-gnu-emacs@gnu.org; Thu, 12 Jul 2018 16:18:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49488) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fdi2M-0007uL-65 for bug-gnu-emacs@gnu.org; Thu, 12 Jul 2018 16:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fdi2L-0004yn-S2 for bug-gnu-emacs@gnu.org; Thu, 12 Jul 2018 16:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Jul 2018 20:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 12747-submit@debbugs.gnu.org id=B12747.153142664219084 (code B ref 12747); Thu, 12 Jul 2018 20:18:01 +0000 Original-Received: (at 12747) by debbugs.gnu.org; 12 Jul 2018 20:17:22 +0000 Original-Received: from localhost ([127.0.0.1]:57385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdi1i-0004xk-71 for submit@debbugs.gnu.org; Thu, 12 Jul 2018 16:17:22 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:49613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdi1g-0004xc-5y for 12747@debbugs.gnu.org; Thu, 12 Jul 2018 16:17:21 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w6CKHIBn030922; Thu, 12 Jul 2018 16:17:18 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 88BDA652D1; Thu, 12 Jul 2018 16:17:18 -0400 (EDT) In-Reply-To: (Noam Postavsky's message of "Thu, 12 Jul 2018 15:54:42 -0400") X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered TRK_NCM1=0.1, EDT_SA_DN_PASS=0, RV6328=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6328> : inlines <6747> : streams <1792360> : uri <2672655> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148475 Archived-At: >>> 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. > Hmm, actually there wasn't that much discussion about it, one person > reported it made a big difference: > https://github.com/magit/magit/pull/2834 Seems like a good enough URL top put there. IIUC magit's code uses a different approach from the one I installed in diff-mode (i.e. it eagerly calls smerge-refine on all hunks), which is likely to suffer much more severely from performance issues on large diffs, so I think write-region-inhibit-fsync won't make a big difference for diff-mode, but it's still a good change in any case. Note that both approaches suffer identically when bumping into a large hunk, OTOH. > There was previous discussion about smerge refinement being slow, but > nobody narrowed it down to fsync in particular, and the conclusion > there was just "call smerge-refine-subst less". Yes, I think this one is really case of Magit's approach being simply too eager. Stefan