From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov 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 07:44:57 +0300 Message-ID: References: <20200403174757.GA8266@ACM> <20200405195753.GG5049@ACM> <542b48ba-4dfa-820f-ba50-4b147ab6d8e2@yandex.ru> <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; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="120175"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cc: rms@gnu.org, emacs-devel@gnu.org, rudalics@gmx.at, rrandresf@gmail.com, acm@muc.de, Eli Zaretskii To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 11 06:45:50 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 1jN81e-000V90-DT for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 06:45:50 +0200 Original-Received: from localhost ([::1]:48752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jN81d-00073G-Du for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 00:45:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48997) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jN80u-0006X2-TX for emacs-devel@gnu.org; Sat, 11 Apr 2020 00:45:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jN80t-0003C2-Mv for emacs-devel@gnu.org; Sat, 11 Apr 2020 00:45:04 -0400 Original-Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:39709) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jN80r-00039b-BL; Sat, 11 Apr 2020 00:45:01 -0400 Original-Received: by mail-wm1-x344.google.com with SMTP id y24so4623612wma.4; Fri, 10 Apr 2020 21:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=lejKnLemp6qkeYI5nCTUgRJHWrrSnHx0ns9CufkCWMA=; b=uNa7wBUJZhvuFC9NOkKgyNbLrQMoL2+LQ3XLLx1uUmKZylYfz2MLvUggq4dty8N2H+ a03qBsfA9ak9FIpr1AcUEeACEb+NGqtw1O/mNmgvKfaMoM79dIJ4Dye6/lamng9QaFR/ K7uOX5IvVnMXfy+HBtNVvp7Sw86XtMh2O7/YT2Glw+sQVF/jieLMEVMXcjAksNtXcBKk OmFbSZjpHBydfiUWj9N3lwF2lq2OkfycVcn9gq4KR1N2+A99fNRef9FRvJhS92zuhJ6t XZdq2pE63yq+G+Y1Mcv+IrysoXUKbJlwscuLjI3uiEnc9b3JfRkC6RdIEGn9UUdOKTRq tViQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lejKnLemp6qkeYI5nCTUgRJHWrrSnHx0ns9CufkCWMA=; b=kdybrimXLiCHKox+MvcEGbfRisXKKJguW6zt7b1PLr/WovQFTFPhX3AmXeJ3FfnL9X 3HG68+0jA7urhEZWVe1UfaLTYcbBd2MhC8D+oBEcVwJMzlMU3N5dT2r+JWdZdLM+nVbv xfA8JuIISbDlVcvquAArA0IuHxXO/gj7pNnbQRo3RyC0ksDwDR/xlw04FR67GZEtW8Yp RK14ywg71DS33rwKPKicKgbtevNO3ay+1DTQrjLzMaBSvM9zU/oNSSt2VQ2XNmywx6h7 IhI+/B6PAmtfz/3V21kyRwgqbP9r3cNR5tvas+w9mRY98SoarcN5ftRQ+mqNZul8l2Im Npig== X-Gm-Message-State: AGi0PubABwJzofUb7GdPGTXsb5PLSrXtAoS4HFMAWib+FXPEDTdN7+rV A76MXmjgA4RlbpiALwqgf/8= X-Google-Smtp-Source: APiQypJa53mSggynMrWDLw3BznY6HN+vSgp4DPSou+ET8R2BOv/IgCyC+BjhJUJS5LEssfedMeOseg== X-Received: by 2002:a1c:750a:: with SMTP id o10mr8031894wmc.124.1586580299943; Fri, 10 Apr 2020 21:44:59 -0700 (PDT) Original-Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id y16sm5758894wrp.78.2020.04.10.21.44.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Apr 2020 21:44:59 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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:246815 Archived-At: On 10.04.2020 20:46, Stefan Monnier wrote: >> When the last repetition is executed, the behavior seems fine already if the >> value is 0. What I see is "flickering" during scrolling, while C-v is still >> pressed. > > Hmmm... I don't know why you see "flickering" during the scrolling, indeed. > > And I'm surprised you don't see "flickering" on the last repetition: the > way jit-lock-defer-time works, when input-pending-p is non-nil, jit-lock > marks the chunk as fontified (which is a lie), and this chunk will > always go past `window-end`, so on the last repetition the beginning of > the window is not passed to jit-lock at all (because it was part of the > last chunk of the previous call to jit-lock, with input-pending = true), > and it only gets fontified a bit later via the timer. 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? Similarly, I usually don't see a flicker right after visiting a file. Only sometimes. Do you? > 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? > Along the lines of what you proposed, I just tried the patch below, > which is a bit like (setq jit-lock-defer-mode 0) but without the idle timer. > It's not quite right either, tho (e.g. `emacs -Q src/xdisp.c` fails to font-lock > the initial window, tho it does get font-locked as soon as I move the > cursor). I also had to make input_was_pending non-static to make it work. 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). The main plus there being that it *can* keep up with the keyboard's repeat rate. 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).