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 03:21:52 +0300 Message-ID: <2ae375b2-da26-5525-603a-73133fda432d@yandex.ru> References: <20200403174757.GA8266@ACM> <83blo7v68b.fsf@gnu.org> <1845d7aa-9ae4-3d95-6a30-c7b1d8d8adec@gmx.at> <83a73qt6zs.fsf@gnu.org> <97c4254e-ff43-8402-3645-f713c408c245@gmx.at> <83y2r9syby.fsf@gnu.org> <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> <83h7xrmjg3.fsf@gnu.org> 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="21978"; 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, monnier@iro.umontreal.ca, acm@muc.de To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 11 02:22:43 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 1jN3v1-0005du-Oe for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 02:22:43 +0200 Original-Received: from localhost ([::1]:47326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jN3v0-0001P7-LJ for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 20:22:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59633) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jN3uL-0000zH-II for emacs-devel@gnu.org; Fri, 10 Apr 2020 20:22:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jN3uK-00065b-7h for emacs-devel@gnu.org; Fri, 10 Apr 2020 20:22:01 -0400 Original-Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:43880) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jN3uI-00064U-G1; Fri, 10 Apr 2020 20:21:58 -0400 Original-Received: by mail-wr1-x442.google.com with SMTP id i10so4036132wrv.10; Fri, 10 Apr 2020 17:21:58 -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=0fvboBUbdov60iBAdkB86kJEmNc85HgbgObV/mt+klU=; b=FWiAPOy+c2rXqJ089uNv3hamYmP51tIAgqoKDm5U7qTr12p8dxNPaJUewvvSpH4kYG HccF98HWTdNt6Deewkfrjxqnk+/v+nzSBGhEgtAiTFt/MZOPbb5ujG23mb/RrxiW+e2B fesXo8W8ZWyN/Uf2Irlk7lhzKnrJSUcfzUAeLUo1W2AGfydwNzrjaSGgwpWnqYJjMsex +OiiX3q22zGhg1U+Snc/Ge8z6m+AQqwRRRRi1KPv17Gp2feu9MMVdnXuw8ipdbVAvifL UNaP5aZleP+sd49/vk6KWyKOIpJgGw4fcnwt4OkDsTJAQdHw4RldeYpABB3zjzWDnA+0 LC6Q== 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=0fvboBUbdov60iBAdkB86kJEmNc85HgbgObV/mt+klU=; b=er/AQVXyLZmILPh7Y8fXgNxrmuNr+Q1BmH4cjtLq0/+lxnPMSVdvmkzYxMwSsG5AKI f/yi7c295GoHVTgcP06xLvdkBBWrQwsVIQ6toA0RsFQiUgr5gPdmnb0gBRi2uEb561iw v55mH2bMML1UTe23Q7rOXOdlfHLrSTrMkT2pfP+aSLXrI7F6agIlkMdBDn+XkpwvnS2J R25C1KSI3YStcLO2V/IpxwDKjue6dP2f2lhaUH5h+Gg0eaK7WA701rs+jkyh87pOTYBw wty8uqKI0rcu90bISEvYWHZbLWYgsc5NoDEuoXAnH/ecNPkA3cdvaJKybWc0fNCMqkpG itiA== X-Gm-Message-State: AGi0PuZbW1VwDg61PHvPAvNyYawwUOi5X0hXFan5fjXEdUGpjO8taSl7 kfeqPiJerfgsJVocegwPIBQ= X-Google-Smtp-Source: APiQypI2bOkj9MXn0cumxt1Z5N6A4Np67buLnUNYK8p9LcQJ1mBnLKfZZ7OiESj0xOulB+g53h29XA== X-Received: by 2002:adf:decb:: with SMTP id i11mr5912669wrn.140.1586564515536; Fri, 10 Apr 2020 17:21:55 -0700 (PDT) Original-Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id s24sm3629289wmj.28.2020.04.10.17.21.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Apr 2020 17:21:54 -0700 (PDT) In-Reply-To: <83h7xrmjg3.fsf@gnu.org> 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::442 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:246812 Archived-At: On 10.04.2020 18:47, Eli Zaretskii wrote: >> On 10.04.2020 16:34, Eli Zaretskii wrote: >>> It doesn't flicker here. Maybe the double-buffering is the reason? >> >> Double-buffering decreases the number of display updates, so it hardly >> can be the cause of this. > > What else could be the reason of differences between what we see on > our respective systems? Maybe the fact that you see updating the highlighting after the text has been displayed as okay, and I don't. It feels like flickering to me, a visual aggravation. Thus, if I see that during scrolling, it's also "flickering". >> It doesn't flicker while scrolling because it simply shows unfontified >> screenfuls of code. Which is unacceptable for default behavior. > > Showing unfontified text _is_ the intended effect of > jit-lock-defer-time. On slow machines, I fail to see how this could > be worse than having Emacs hang for many seconds. There can be other options. And on *very slow* machines, okay, that can be a solution. Even so, a low enough machine might not keep up with scrolling even if font-lock is skipped, so it's not a panacea. >> And I'd hesitate to recommend it to anyone even to deal with >> performance problems. > > Not sure why would you hesitate. Because it feels like giving up. "Here's a solution, please disregard that it comes with obvious downsides". >> It *does* flicker afterwards (e.g. 0.5 sec after I depress C-v), because >> that's what deferred jit-lock does: it applies syntax highlighting with >> a delay. > > Highlighting shouldn't flicker; it doesn't here. It just paints the > text with colors. Redisplay is smart enough to redraw on the glass > only those parts whose colors have changed, and that shouldn't cause > any flicker. That's what I call flickering in this particular discussion. When delay is small (e.g. <= 0.1), the visual effect is closer to what we would call flickering traditionally (fast visual changes in display where there shouldn't be any). When the delay is larger, the effect is somewhat less aggravating, but at the same time the lack of syntax highlighting for prolonged times is more obvious. That's like a feature breakage. >> So I type, wait 0.5sec, and syntax highlighting arrives. It's a >> less-aggravating kind of flicker because of its laid-back pace, but I >> still wouldn't call it acceptable user experience. > > I guess we disagree here. And I don't really see what better solution > could be provided, when Emacs is unable to keep up with keyboard > auto-repeat. The only solution is to do less, and jit-lock-defer-time > does just that. If you go back to my last patch and try it, you might see that both the default behavior, as well as the new behavior with f-b-i-s on, *look* more responsive. And if you go to the first email in this subthread, there are justifications for each change there. None of it deals with keyboard auto-repeat. On the other hand, having input keys fire as fast as they can is not a hard requirement. Ideally, Emacs should stop scrolling as soon as I release the 'v' key. No matter how many screenfuls it had managed to scroll through in the meantime. (And there are other commands where such behavior would also be preferable). I think that can be implemented, in the GUI Emacs, at least.