From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Recent diff-mode changes feel slow with TRAMP Date: Sat, 19 Jan 2019 23:07:28 +0200 Organization: LINKOV.NET Message-ID: <877ef0gxv3.fsf@mail.linkov.net> References: <87r2di5x4r.fsf@secretsauce.net> <87ef9f6cdt.fsf@dima.secretsauce.net> NNTP-Posting-Host: ciao.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ciao.gmane.org 1547934991 141258 195.159.176.228 (19 Jan 2019 21:56:31 GMT) X-Complaints-To: usenet@ciao.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2019 21:56:31 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Dima Kogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 19 22:56:29 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1gkybL-000aiF-Qn for ged-emacs-devel@m.gmane.org; Sat, 19 Jan 2019 22:56:28 +0100 Original-Received: from localhost ([127.0.0.1]:60312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkybU-0001hq-TK for ged-emacs-devel@m.gmane.org; Sat, 19 Jan 2019 16:56:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkyaZ-0001h3-TG for emacs-devel@gnu.org; Sat, 19 Jan 2019 16:55:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkyaY-0002s4-Qn for emacs-devel@gnu.org; Sat, 19 Jan 2019 16:55:39 -0500 Original-Received: from bonobo.maple.relay.mailchannels.net ([23.83.214.22]:36223) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gkyaV-0002lr-6e for emacs-devel@gnu.org; Sat, 19 Jan 2019 16:55:37 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A927C12431A; Sat, 19 Jan 2019 21:55:29 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a6.g.dreamhost.com (unknown [100.96.35.77]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 57ACA123E3E; Sat, 19 Jan 2019 21:55:29 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a6.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Sat, 19 Jan 2019 21:55:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Lettuce-Reaction: 459c1d80033cff99_1547934929493_2619671164 X-MC-Loop-Signature: 1547934929493:2646202263 X-MC-Ingress-Time: 1547934929493 Original-Received: from pdx1-sub0-mail-a6.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a6.g.dreamhost.com (Postfix) with ESMTP id E3FC680B34; Sat, 19 Jan 2019 13:55:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=weDJWQnG92vFophW5IuuTa3lpOA=; b= d1qvJ/nfGyGzaXAAvg/AJpTc3+ItERb3eAP/HeFHP5P0xA8abzDKFBGWC1g+RnQw P/PQ4BDQ8rvFjwkF3yFxxpXoXkW2+MjsJLimZAujapTODugq9tLTA8Kke2HYRPMp slTtHSxmjAeyqUIbXurJcsUfstEHdgLN5gjfrZAFxb4= Original-Received: from mail.jurta.org (m91-129-101-91.cust.tele2.ee [91.129.101.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a6.g.dreamhost.com (Postfix) with ESMTPSA id C6B5F80B10; Sat, 19 Jan 2019 13:55:27 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a6 In-Reply-To: <87ef9f6cdt.fsf@dima.secretsauce.net> (Dima Kogan's message of "Sun, 13 Jan 2019 21:23:26 -0800") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrhedvgdduheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuffhomhgrihhnpehsvggtrhgvthhsrghutggvrdhnvghtnecukfhppeeluddruddvledruddtuddrledunecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtuddrledupdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhhishhtshesughimhgrrdhsvggtrhgvthhsrghutggvrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 23.83.214.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232504 Archived-At: > OK. Yes. Setting diff-font-lock-syntax to nil makes it fast again. > Thanks a lot for pointing me to that. > > The docs for diff-font-lock-syntax say that 'hunk-only is the fastest > setting here, but that's not true, right? Isn't nil the fastest one? `hunk-only' is the fastest non-nil option. > For my use cases, I don't think I want this enabled at all, TRAMP or > not. Combined with refinement, this makes the diffs more difficult to > interpret, at least to me. And even without TRAMP, this makes it slower. > Do we really want both refinement and this font-locking enabled by > default? Modern version control systems like GitHub and GitLab enable both by default. > There's also a visual issue with auto-refinement. If I load a patch file > with 'emacs -Q -rv' (no user settings, but reverse video), it looks like > this: > > http://notes.secretsauce.net/emacsdiff.png > > Note that the bright green refined face makes the leading + invisible. > There's an identical problem with the bright red making the leading - > invisible. It's easy to improve auto-refinement to not put highlighting on diff indicators like it's already implemented in line-based diff-font-lock-syntax. BTW, there is another issue that could be improved in auto-refinement: when changes are only in whitespace it highlights nothing because it's word-based. I think in this case it could fall back to the default mode that doesn't ignore differences in whitespace, thus highlighting whitespace.