From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3 Date: Sat, 11 Apr 2020 09:45:17 -0400 Message-ID: References: <20200403174757.GA8266@ACM> <0a5f70aa-4985-8f8d-81d6-6ac4a60a94f9@yandex.ru> <838sj8sphk.fsf@gnu.org> <834ktwsmfw.fsf@gnu.org> <83imibqsmm.fsf@gnu.org> <478c2aab-a5fc-61c2-02e2-2d9846b95273@yandex.ru> <83v9m9nltx.fsf@gnu.org> <4c5ebff1-39ab-3d63-6118-42befc93b862@yandex.ru> <6914ebb2-2dfa-efdc-1181-c42259219bca@yandex.ru> <83zhbjna0q.fsf@gnu.org> <903b7d31-bd0e-e2dc-a981-d090ed959ccb@yandex.ru> <83pncfmpme.fsf@gnu.org> <94ee576f-ff26-cad9-3e22-b75299ff9cdb@yandex.ru> <37afe0b1-7763-4d63-3dc2-5b20415207fe@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="78105"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: rms@gnu.org, emacs-devel@gnu.org, rudalics@gmx.at, rrandresf@gmail.com, acm@muc.de, Eli Zaretskii To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 11 15:46:40 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNGT2-000JsP-EF for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 15:46:40 +0200 Original-Received: from localhost ([::1]:52124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNGSh-0008Vp-ML for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 09:46:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36404) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNGRp-00082U-OL for emacs-devel@gnu.org; Sat, 11 Apr 2020 09:45:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNGRn-00020m-Iv for emacs-devel@gnu.org; Sat, 11 Apr 2020 09:45:25 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49589) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jNGRl-0001zb-P5; Sat, 11 Apr 2020 09:45:21 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6CBE480B07; Sat, 11 Apr 2020 09:45:20 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A501E80D43; Sat, 11 Apr 2020 09:45:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1586612718; bh=Q++Lw7GIrcuakzWRcRW8epfeDFUluCFKureyJtSviJ8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=F1/RO8P+F37zNxdmryggSeEDREFe7Bn0BC/wv6c8xD3naV7iynav+DdP4+lNOH1nu iVKPEmrH1QFo1hgKOaYTvNtdivT0DQpoL9Mdq0v8xwkDUXEcHOdQb7UVW/4caYYEek XBEyqSj6Oh3TT14FXhtElh8Wg5Xx8iVzWxaeidFb1ArXxR4cMDpem1d1cVGtSRUZok eJM6Tf8JKQ5MC9LK1UXpKL3BmXiVWEFce4mB0O4Qbgx4g95pwJDWzsumPmjl8Swy3c 6tvkNYUDRB+U7UFvPvQueLo+8gkVwY6TF/vffbIBeHrpLw01zXChUwl/3XYQ+shEMo OoQCO7rIozZGQ== Original-Received: from alfajor (unknown [104.247.241.114]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D361E120480; Sat, 11 Apr 2020 09:45:17 -0400 (EDT) In-Reply-To: (Dmitry Gutov's message of "Sat, 11 Apr 2020 07:44:57 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246832 Archived-At: > Perhaps the answer is the same as why I do see mostly fontified screenfuls > while scrolling, even with jit-lock-defer-time=0. Like... idle timers manage > to run from time to time? That's possible, but if so, I think it might be a bug in itself. > Similarly, I usually don't see a flicker right after visiting a file. > Only sometimes. Do you? I can't remember seeing a delayed highlight when visiting a file, no. [ Tho I'm not completely sure which config you're thinking of. I assume you're talking about (setq jit-lock-defer-time 0). ] >> That's one of the main advantages of the way >> `fast-but-imprecise-scrolling` works: it doesn't lie about having >> fontified that chunk. > Is there a downside to that strategy? > What would happen if jit-lock didn't apply the 'defer' value in this case? Not sure what would happen, but it would mean jit-lock's fontification-function doesn't hold its end of the bargain with the redisplay. Maybe it would cause jit-lock to be called right back on the next character? > The result is I see a lot more unfontified screenfuls when scrolling (which > is a minus), but scrolling is even faster now (but it was fast with previous > patches or f-b-i-s already). Further, it almost certainly suffers from the > same same problem that makes fast-but-imprecise-scrolling apparently > unsuitable for being a default (loss of precision). Normally, input_was_pending should be the same during scroll than during the subsequent redisplay, so there should not be any loss of precision, no. > The main plus there being that it *can* keep up with the keyboard's > repeat rate. Aha! > But I wonder if anyone would want to scroll this quickly when they can't > read this fast anyway (or even briefly scan through the contents of the > windows that fly by). I think we should aim for "scrolling always keeps up". When I lean on C-v, it's often because I'm looking for something which I can recognize visually, so when display is skipped it defeats the purpose. Of course, sometimes the "something which I can recognize" needs to be font-locked to be recognizable in which case skipping jit-lock may also defeat the purpose (unless it had been font-locked earlier), but still, something is better than nothing. Stefan