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: Fri, 17 Apr 2020 20:04:04 +0300 Message-ID: <464b5639-7790-fdbc-b519-22a6b0e8c016@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> <83tv1rn8fx.fsf@gnu.org> <4f8bb277-b376-97bf-8539-799688d8e66d@yandex.ru> <83eesvmj15.fsf@gnu.org> <6eec7f68-770e-b3b1-4627-6222f3ef7216@yandex.ru> <83ftd9kwlu.fsf@gnu.org> <1de9d24f-eeb7-7d0a-3768-4baba4365066@yandex.ru> <83zhbcdmyi.fsf@gnu.org> <61f565cd-4fee-d48c-a9ef-b78419b3d058@yandex.ru> <83wo6ed4kb.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="85946"; 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: acm@muc.de, rrandresf@gmail.com, emacs-devel@gnu.org, rms@gnu.org, rudalics@gmx.at To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 17 19:05:25 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 1jPUQf-000MFC-UN for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Apr 2020 19:05:25 +0200 Original-Received: from localhost ([::1]:49842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPUQe-0005xF-Us for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Apr 2020 13:05:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41977) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPUPV-0004i3-CV for emacs-devel@gnu.org; Fri, 17 Apr 2020 13:04:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPUPS-0008GU-Vl for emacs-devel@gnu.org; Fri, 17 Apr 2020 13:04:13 -0400 Original-Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:50194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPUPS-0008Cy-OU; Fri, 17 Apr 2020 13:04:10 -0400 Original-Received: by mail-wm1-x331.google.com with SMTP id x25so3655861wmc.0; Fri, 17 Apr 2020 10:04:09 -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=5bgIQWAuT8UPUh+dQX5WGlVbcqt0ylj8tQBogIn5Ktw=; b=jI1gcf1JUZnT3Tf6IYfZKn8nccWn+m7q+yfbChjWw1EXJ5mn7feWKcgN9dJ42idiYO 617WHdv+ifpeXKSXbfXO6q19E4cK93injRzpI79xCFx/1KesaIttkI/RIlEKeaKOrEi9 +1QoKZfxGZbqYwsZGWp1jkR4DL8FA7KM8AzwaspF4v8I6XcqhAeWEXHHMBvml6HPED9s GxK1x9Xf9t5S8axIxshA+CncdokVMtH62PBawWzny8IicrkN4fdbpiij4SMSt2CPf0Tr dKjtmD8IB5o4B9aJEwDGjwRTb4jqMw9YWHyyjNVnDyKcULF+wXDWI6UICQQgaH2nhXnt FZUg== 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=5bgIQWAuT8UPUh+dQX5WGlVbcqt0ylj8tQBogIn5Ktw=; b=UmVRflE5LnlVLKjLoOgaBLAgf4EYTP5nxvM2hhqkOAJ3WN/GKUT61VYfMaL9wzRrC4 XVScFRgXjoFE9qQPv9/4supKA2JUXZtOMYeEzvGG22R7fk1Fbucz8VcLnUME1gfqJcT7 5URW4WJwelvBGWi31kEPiHl7Fh1zX1GYdDfGAkGm0o73wW/yDUynjr2ocDxYDUdY9Zhh ppY2sFmBu3XATs691JwqegzHaFvHh9eiNfjxFW6QyRkG2fpEnPWojPAtliitEcSae5VH GiBb3E3HKHCcymooI+6Xz0AXEqPg4uxlVVDqYCBLqQPVED6mNG5trr2ESZKp+VqZOFE6 /fPA== X-Gm-Message-State: AGi0PuZH4t35ne4WmsJqe9znUoI9hu59fj6Ifh8KDcz3HNdcTYxY6njW 4TfYEVAJ5nm0XIStj/19IaNwLPT7i8o= X-Google-Smtp-Source: APiQypLM3gniYgXEqLyXiOh9KnUM2LyHbFNxW7NBYsWtulDWwldpskQzDINXCGRZYoPhpOoJ5AsISw== X-Received: by 2002:a1c:2b43:: with SMTP id r64mr4480878wmr.77.1587143048226; Fri, 17 Apr 2020 10:04:08 -0700 (PDT) Original-Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id t8sm32421263wrq.88.2020.04.17.10.04.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Apr 2020 10:04:06 -0700 (PDT) In-Reply-To: <83wo6ed4kb.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::331 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:247183 Archived-At: On 17.04.2020 09:11, Eli Zaretskii wrote: >>> I think you will find that many more do than you seem to assume. Even >>> just redisplaying a window does this in many cases (to find the proper >>> place for window-start position). C-n and C-p do as well. And when >>> scroll-conservatively is in effect, almost every command that moves >>> point does. >> >> Would that be... almost all of them? > > I don't think I understand the question. Please elaborate. I think the majority of commands either move point, or have the potential to do so. Even those that do completing-read, for example. >> (Indeed, the fact that (setq scroll-conservatively 1) doesn't work as >> well as one would expect is a real bug IMO). > > I'm not aware of any bugs in that, so please describe what you think > is a bug in more detail. 1. (setq scroll-conservatively 1) 2. Visit xdisp.c. 3. Lean on C-n. 4. From time to time, you will see point jump into the middle of the screen, when font-lock takes too long, apparently (or maybe it corresponds to GC pauses). This shouldn't happen because next-line only moves by one line. >> In any case, if there is a way to dynamically detect these cases and >> disable redisplay skipping for them, I'd like to try that out. > > Yes, jit-lock-defer-time is that way. But you already know that. No, it speeds up redisplay. It doesn't make *sure* that redisplay is not skipped. To do that, need to modify the condition of skipping redisplay. > If that's not what you meant, then what exactly would you like to be > able to detect? The move_it_* functions are the entry point to the > display simulation code, and they are used all over the place. Perhaps detect the cases when move_it_* was used inside the command's implementation? >> Even more if there was a way to put the results of "simulated redisplay" >> to use in the "real" redisplay later. > > That happens automatically, since the 'fontified' property they > produce is left on the buffer text. That might be sufficient if we assume that font-lock is always the slowest part of redisplay (for some commands it might not always be true, but I'm guessing here). But with that assumption, the extra condition of not skipping redisplay could be simplified (?) to only checking whether the current screen has been fontified already (i.e. 'fontified' is non-nil). If it's fontified, we won't skip redisplay.