From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitrii Kuragin via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#57434: 28.1.91; Terminal Emacs Mac OS flickering. Date: Mon, 29 Aug 2022 09:03:15 -0700 Message-ID: References: <83edx1znjl.fsf@gnu.org> <83czclzms4.fsf@gnu.org> <83pmgjvy24.fsf@gnu.org> Reply-To: Dmitrii Kuragin Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006c1dc805e76367c4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6446"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gerd =?UTF-8?Q?M=C3=B6llmann?= , 57434@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 29 18:12:39 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oShNM-0001Sw-Ep for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Aug 2022 18:12:36 +0200 Original-Received: from localhost ([::1]:55558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oShNL-00011d-Ht for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Aug 2022 12:12:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oShF4-0004cG-SZ for bug-gnu-emacs@gnu.org; Mon, 29 Aug 2022 12:04:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oShF4-00087K-HH for bug-gnu-emacs@gnu.org; Mon, 29 Aug 2022 12:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oShF4-0006zD-C6 for bug-gnu-emacs@gnu.org; Mon, 29 Aug 2022 12:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitrii Kuragin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Aug 2022 16:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57434 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57434-submit@debbugs.gnu.org id=B57434.166178901626794 (code B ref 57434); Mon, 29 Aug 2022 16:04:02 +0000 Original-Received: (at 57434) by debbugs.gnu.org; 29 Aug 2022 16:03:36 +0000 Original-Received: from localhost ([127.0.0.1]:33574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oShEd-0006y6-Kk for submit@debbugs.gnu.org; Mon, 29 Aug 2022 12:03:36 -0400 Original-Received: from mail-yw1-f174.google.com ([209.85.128.174]:34392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oShEb-0006xm-A8 for 57434@debbugs.gnu.org; Mon, 29 Aug 2022 12:03:33 -0400 Original-Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-340f82c77baso91674417b3.1 for <57434@debbugs.gnu.org>; Mon, 29 Aug 2022 09:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=ntLbeVdmkQZxzg+DMRSxbcr35q5D2gtwA+PuP80wxQ8=; b=TTwxU/Rrk6LXKCPMDQXeKsbh/JrJkuv33HLfpw9IXB0B4RAYyHdiruMe+sfIOOpLKL IeE53f4W9zUh0NgSwTtl4HexjbKWHnuJSEMEuoSGR/lts93pTOrsaYsaB63iiDxIlqaY 5sBJKzSlaTeQptPvzveT75jKNMnMQc3ZKbCXzqIMyS/vjoyVS97qojFBfoUdIjN22zKX XjR0Br55Hw0quOk7e9/WkvlHAU5F7QzXYCtccXhih2nO8wMLAdtWKN3XHz3p82Fadw1x VsymyOSHsoC2YflP6wUlhLE6kskRSPS7e5Qza+wxrGi/aGSju4ywOd7GnbJ231YbZ5DN dCMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=ntLbeVdmkQZxzg+DMRSxbcr35q5D2gtwA+PuP80wxQ8=; b=XOdWgIB3AxUVoQatwzO+4GSjxrD/n+uwn3o1ZSHFnIMORVqYwRl7zhnQlxRGCYZ7G9 eVEqlXYoJqDM4fcD+DqZUtj5iXXFLgPgtUJwH9x7GH9P4rHl0V8e1iS3CLX8o+NqTGHS 9tFzRXMTmc5vJmyzB+z2jvGO7lrjbgU1prrwUisZbhO3RjYMkoB839jTHlpAINect9f7 YnKIMVtCOKcHQtuF/0vJzIOsl7m8REfZrCsIuYj0Pkqg3y4L6m6Xn6/NzKVW1GcqGaNx 7fyfhy1Y5tZrNrO7NbqJmj5vcqtvcpNInwZww38ngu102C0yH9LikbJb826I71Ghw9nr 4Kbg== X-Gm-Message-State: ACgBeo3iggXtObMiGl9BGWRQlmVYHLzBqxMqbumKfQ4MOQgVj2uzQpOi k5JAGFrhlUb1ZDM6GQyww4yuQYGhOXPO2ATXw/Pl+Q== X-Google-Smtp-Source: AA6agR60JEScB1y7+uQqETi8ALvdvY5smkrHLbIsvNdOj3oEeX5yJxDStjs3rdl60cpWQWaksMSxVew4063pbYJk55U= X-Received: by 2002:a81:4d07:0:b0:337:6851:c92f with SMTP id a7-20020a814d07000000b003376851c92fmr10742686ywb.416.1661789006436; Mon, 29 Aug 2022 09:03:26 -0700 (PDT) In-Reply-To: <83pmgjvy24.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:241047 Archived-At: --0000000000006c1dc805e76367c4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable No, I see flickering during scrolling. And the problem is much worse when I have line number mode enabled. The buffers do not change, and the frame at the same position, but line numbers change because they're in 'visual mode (relative numbers). On Mon, Aug 29, 2022 at 9:01 AM Eli Zaretskii wrote: > > From: Dmitrii Kuragin > > Date: Mon, 29 Aug 2022 07:18:43 -0700 > > Cc: Gerd M=C3=B6llmann , > > 57434@debbugs.gnu.org > > > > I compiled with `-O0 -g3`, then > > ``` > > lldb > > (lldb) file nextstep/Emacs.app/Contents/MacOS/Emacs > > Current executable set to > '/Users/kuragin/Desktop/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' > > (x86_64). > > (lldb) breakpoint set -f scroll.c -l 270 > > Breakpoint 1: where =3D Emacs`do_scrolling + 485 at scroll.c:271:11, > address =3D 0x0000000100032da5 > > ``` > > > > But, it doesn't stop there... > > Why scroll.c:271, when the code you patched begins on line 684? > > > When I have line numbers enabled, I assume, the scrolling logic would > always try to insert/delete/write lines. In > > my case it might be: > > - Writing (Is that writing on top of the current lines?) is cheaper. > > - Screen flickers because of the specific frequency of the terminal (o= r > the way we flush the buffer). > > For example, we insert empty lines and then the screen is updated, > only then we add content in there and > > redisplay again. > > > > Potentially, some redrawing might happen inside of `ins_del_lines`? > Instead of redrawing the whole screen, > > we redraw it in the middle of modifying it? > > There shouldn't be any redrawing when none of the shown buffers > changes in any way. You see flickering when Emacs is completely idle, > yes? > --=20 *If you get an email from me outside of the 9-5 it is *not* because I'm always on or expect an immediate response from you; it is because of work flexibility . Evening and weekend emails are a sign I allocated some regular working hours for other things (such as family, gym, friends,...). And I encourage you to feel free to do the same. --0000000000006c1dc805e76367c4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
No, I see flickering during scrolling.

And the problem is much worse when I have line number mode enabled.

The buffers do not change, and the frame at the same po= sition, but line numbers change because they're in 'visual mode (re= lative numbers).

On Mon, Aug 29, 2022 at 9:01 AM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Dmitrii Kuragin <kuragin@google.com= >
> Date: Mon, 29 Aug 2022 07:18:43 -0700
> Cc: Gerd M=C3=B6llmann <gerd.moellmann@gmail.com>,
>=C2=A0 =C2=A0 =C2=A0 =C2=A057434@debbugs.gnu.org
>
> I compiled with `-O0 -g3`, then
> ```
> lldb
> (lldb) file nextstep/Emacs.app/Contents/MacOS/Emacs
> Current executable set to '/Users/kuragin/Desktop/emacs/nextstep/E= macs.app/Contents/MacOS/Emacs'
> (x86_64).
> (lldb) breakpoint set -f scroll.c -l 270
> Breakpoint 1: where =3D Emacs`do_scrolling + 485 at scroll.c:271:11, a= ddress =3D 0x0000000100032da5
> ```
>
> But, it doesn't stop there...

Why scroll.c:271, when the code you patched begins on line 684?

> When I have line numbers enabled, I assume, the scrolling logic would = always try to insert/delete/write lines. In
> my case it might be:
>=C2=A0 - Writing (Is that writing on top of the current lines?) is chea= per.
>=C2=A0 - Screen flickers because of the specific frequency of the termi= nal (or the way we flush the buffer).
>=C2=A0 =C2=A0 For example, we insert empty lines and then the screen is= updated, only then we add content in there and
> redisplay again.
>
> Potentially, some redrawing might happen inside of `ins_del_lines`? In= stead of redrawing the whole screen,
> we redraw it in the middle of modifying it?

There shouldn't be any redrawing when none of the shown buffers
changes in any way.=C2=A0 You see flickering when Emacs is completely idle,=
yes?


--
*If you get an email from me outside of the 9-5 it is=C2= =A0not=C2=A0because I'm always on or expect an immediate respons= e from you; it is because of=C2=A0<= a href=3D"http://www.inc.com/john-boitnott/how-flexible-hours-can-create-a-= better-work-life-balance.html" style=3D"color:rgb(17,85,204)" target=3D"_bl= ank">work flexibility.=C2=A0=C2=A0= Evening and weekend emails are a sign I allocated some regular working hour= s for other things (such as family, gym, friends,...).=C2=A0 And I encourag= e you to feel free to do the same.

--0000000000006c1dc805e76367c4--