From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Removing redisplay-dont-pause Date: Mon, 02 Dec 2024 18:50:20 -0500 Message-ID: References: <86ed3awd16.fsf@gnu.org> <86v7w582ms.fsf@gnu.org> <9E402D0E-43D9-458F-8C51-043F9F398DD9@gmail.com> <86bjxv67ha.fsf@gnu.org> <874j3nr8d6.fsf@localhost> <865xo35uwe.fsf@gnu.org> <871pyrqwyz.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33342"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Ihor Radchenko , Eli Zaretskii , mattias.engdegard@gmail.com, emacs-devel@gnu.org To: Gerd =?windows-1252?Q?M=F6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 03 00:51:18 2024 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 1tIGCD-0008Vq-Md for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Dec 2024 00:51:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIGBa-0007ns-5L; Mon, 02 Dec 2024 18:50:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIGBQ-0007nO-Qj for emacs-devel@gnu.org; Mon, 02 Dec 2024 18:50:29 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIGBN-0001rj-8A; Mon, 02 Dec 2024 18:50:27 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 05B2A100055; Mon, 2 Dec 2024 18:50:22 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1733183421; bh=xpESWqd4UvRfuG44JhV3cWMbi1i1cPj5jy+b/4RCkWE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dwGUHjWHIp1mSIVFM1RcKCyPibcvMoZ1gLL9Sp1z6+jFRl76lrlhRgjdu68lDvPyZ gqtEkmUJ5UPHT3HAxu3sLyKErg5osftm0ExYu/VHQdq2Prx3HbupnMU5qGlg6Ag+4r B58QbBQPpUBoptMAoFst2oBHJZxfRVAAOoHFz9wruK3Z71vCLlxkKkmGVDFxr5y14a hIlv16Uy5V+5msiQU9n1MlI6iUYkJYVmHMBFr/27jxSKBQLyEytx1rm/OvqISfPxuZ b7i98S5WdLATNlCRONdX/p2Vi7Gwiyk61o3RQTzML8lidJ19+E+VoEAftl9t/Qj31x sRkZ+egv/+D6w== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 346BB100042; Mon, 2 Dec 2024 18:50:21 -0500 (EST) Original-Received: from alfajor (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E984712023D; Mon, 2 Dec 2024 18:50:20 -0500 (EST) In-Reply-To: ("Gerd =?windows-1252?Q?M=F6llmann?= =?windows-1252?Q?=22's?= message of "Mon, 02 Dec 2024 05:18:25 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325958 Archived-At: >> Assume the incoming events come every T seconds and take T1 seconds to >> run, and the subsequent redisplay takes time T2+T3 (where T2 is the time >> in the middle where `redisplay-dont-pause` is consulted). > > I think you meant to say that T3 is the phase at the end where > redisplay-dont-pause is checked, the update phase that writes to the > screen. T2 would then be the phase where the glyphs are produced. My "analysis" doesn't care what's done when betwen T2 and T3, but yes, T2 is the part that's affected by long lines, jit-lock, invisible text, whereas T3 is about actual "drawing", so it can be affected by your 1200 bauds serial line (if you're sufficiently unlucky to be stuck behind such a thing). My impression is that, historically, T3 has been on a mostly decreasing slope over time, whereas T2 has been on a rather increasing slope. So back in Emacs-18, I suspect that T2 was usually dwarfed by T3, whereas nowadays it's rather the reverse. >> - If T < T1, then we plain and simply can't keep up at all, the >> redisplay is just not run at all and incoming events keep accumulating >> as we fall ever further behind the incoming events until the incoming >> events stop (at which point Emacs will only refresh its redisplay >> after it has finally caught up with the buffered input). > The direct_output_for_insert optimization was though for that, ensuring > that at least the line one types in is made visible on the screen. That's my understanding as well. But the change in hardware performance has made it so that in the `direct_output_for_insert` case nowadays T is almost never > T1+T2+T3, which is why we could remove that optimization. Nowadays to get T