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: Sun, 12 Apr 2020 05:51:58 +0300 Message-ID: <3a69f36a-a1d0-ea9f-fcce-2c0cc65e2604@yandex.ru> References: <20200403174757.GA8266@ACM> <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> <2ae375b2-da26-5525-603a-73133fda432d@yandex.ru> <83zhbilamm.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="123394"; 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 Sun Apr 12 04:53:59 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 1jNSkw-000Vzp-I3 for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Apr 2020 04:53:58 +0200 Original-Received: from localhost ([::1]:58284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNSkv-0003ch-La for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 22:53:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48644) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNSj7-0002Oz-LR for emacs-devel@gnu.org; Sat, 11 Apr 2020 22:52:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNSj6-00037k-BP for emacs-devel@gnu.org; Sat, 11 Apr 2020 22:52:05 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:53879) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNSj4-000375-Ig; Sat, 11 Apr 2020 22:52:02 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id d77so6302192wmd.3; Sat, 11 Apr 2020 19:52:02 -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=s0YEfIN6XaFPr3PY2lUj0VzyakeXy2swomwrtfBrZ/Y=; b=c+l4RtSAeZmx1MMJCMuMokf9dXpIiSb2DT35Cz1USnpa+3V45mAdOfuOGCTKCFfcHU SDaNf+DKTmP4+hoSMbZsT1o4ydklT5uuctVT0xd6qn8IcW/AhnoV2Otb2VgcUhKpaKf0 6TNWtnYhiN2cU9rGQ0kvxydEowaCsxuyx4cVjudAjsOdyTZe60VyS6vZcPyIvxKaYRYu pYc8EVJXhwYtloipt0OqDz4ZyTevUkyy0f6DGE4gqcErM4t30o7HxDuzJ7K6PHEhwSI2 VjRFN6cXv7VZz7dPXIasMl0a2dFw1Vn1hsCeSMnHcYSz62iufYNQc7Yt5rO5d5giEEGy b0zg== 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=s0YEfIN6XaFPr3PY2lUj0VzyakeXy2swomwrtfBrZ/Y=; b=Afh6M1T9lgR77ITeUvh57V89fEgNXB/RqGYEyh9t9XTMFsoQe/J6r1kjIGkSzWnBp7 dffmivBHTGNCRR+hZfNO6pvoEgvyG060OMPjgSLIumGxk44fhyzkm/7h88s1kg9XM1/f hCblPmXjXOfSJO2aUfFxvtt+1Xut4pvh6w4fvaHp6ZV0vr9Y5JFGqCTZrEfN32C0Msa0 ajuXZvBiuVz/PjlNB1A6nqKqDTO6+Zo1GwO/BGSwNEl64MW9qya+f/jTPjAennAtqEh2 UlLJUzLWotjsAO9dJy1XC8KoJiWajJ0TsPIuHW4zPXKlvFiHyLKVVCkYy51CP4mnmSQr sO7Q== X-Gm-Message-State: AGi0PuYy9ICWwCjTxaSTNG2jZ+FX2yOSrM6zh0t8Y+oCEFkxR1fo8aAI wMsf2PIT4ikwLa/GFiLrzNU= X-Google-Smtp-Source: APiQypIc9M0BwLjTntfLLAxCe2VLHtFjnAAN1UhsQpxpFrWYShIYOGRUk7u6jgEptF4sJIXvNSsy5Q== X-Received: by 2002:a1c:7301:: with SMTP id d1mr12944383wmb.26.1586659921155; Sat, 11 Apr 2020 19:52:01 -0700 (PDT) Original-Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id v7sm11363180wmg.3.2020.04.11.19.51.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Apr 2020 19:52:00 -0700 (PDT) In-Reply-To: <83zhbilamm.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::334 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:246851 Archived-At: On 11.04.2020 10:55, Eli Zaretskii wrote: >> 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". > > That's not flickering, at least not in our accepted terminology. > Flickering is redrawing of the entire frame, without any changes to > the contents. Allow me to disagree: flickering can be localized. We've have discussions in the past about stuff flickering around the cursor, for example (due to running timers and the absence of double buffering). In any case, I called it that because, for lower values of the delay-time, is feels about about the same, and is similarly annoying. Better names welcome. >> 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. > > On such slow machines, fast-but-imprecise-scrolling is not a solution, > either; IME it actually is worse than jit-lock-defer-time. In doesn't mess with fontification. So the users would lose rather little (most of the time) if such fast-but-imprecise-scrolling was enabled by default, especially with the proposed improvement. IOW, the scrolling speed-up it offers is limited (but could be enough in optimized builds for most of us, and even for -Og builds of current master), but the the downside it brings is the smallest among all the options we've had discussed here. My point above there was rather different: removing features to compensate for a high keyboard repeat rate just doesn't seem like a good solution. >> Because it feels like giving up. "Here's a solution, please disregard >> that it comes with obvious downsides". > > What are the alternatives? If the system is slow, we must cause Emacs > do less so that it doesn't appear as hanging up. I agree with "do less", of course. >> 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. > > Perhaps with optimized builds on your fast machine, they do. But we > are specifically discussing slow systems here. Have you tried them? Do they not look more responsive [while scrolling continues] than the default behavior? >> 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. > > Keyboard auto-repeat (or the equivalent repeated turning of the mouse > wheel) was what started this thread. Let's not change the subject. I'm not changing it. There are two main problems, mentioned from the beginning: - The user doesn't see what's going on (redisplay stops updating). - Emacs continues to do something long after the key have been released, or the mouse wheel stopped rotating. >> 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. > > jit-lock-defer-time satisfies this requirement, at least here, whereas > fast-but-imprecise-scrolling doesn't. (setq jit-lock-defer-time 0) doesn't satisfy that requirement on my machine with '-Og -g3'. >> (And there are other commands where such behavior would also be preferable). > > Which commands are those? 'undo' and 'backward-delete' come to mind, both of which have repeatable bindings in my config. The first one especially can take arbitrary amounts of time. 'previous-line' and 'next-line' too (their misbehavior is usually unnoticed, but just try (setq scroll-conservatively 1)). > Are you sure the current discussion about > jit-lock and its slowdown is relevant for explaining the slowdown of > those commands? It would be relevant if we look into other solutions rather than trying to speed those commands' execution.