From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57434: 28.1.91; Terminal Emacs Mac OS flickering. Date: Mon, 29 Aug 2022 19:01:23 +0300 Message-ID: <83pmgjvy24.fsf@gnu.org> References: <83edx1znjl.fsf@gnu.org> <83czclzms4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12215"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 57434@debbugs.gnu.org To: Dmitrii Kuragin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 29 18:13:50 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 1oShOY-00034M-6c for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Aug 2022 18:13:50 +0200 Original-Received: from localhost ([::1]:37858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oShOX-0002Vj-8Z for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Aug 2022 12:13:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oShD8-0002EO-Q5 for bug-gnu-emacs@gnu.org; Mon, 29 Aug 2022 12:02:19 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oShD8-0007ix-3P for bug-gnu-emacs@gnu.org; Mon, 29 Aug 2022 12:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oShD7-0006uR-T5 for bug-gnu-emacs@gnu.org; Mon, 29 Aug 2022 12:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Aug 2022 16:02:01 +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.166178888826498 (code B ref 57434); Mon, 29 Aug 2022 16:02:01 +0000 Original-Received: (at 57434) by debbugs.gnu.org; 29 Aug 2022 16:01:28 +0000 Original-Received: from localhost ([127.0.0.1]:33562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oShCZ-0006tK-TM for submit@debbugs.gnu.org; Mon, 29 Aug 2022 12:01:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oShCY-0006t6-JO for 57434@debbugs.gnu.org; Mon, 29 Aug 2022 12:01:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oShCS-0007fG-27; Mon, 29 Aug 2022 12:01:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=jrIpTf6naHI4kR6GqAMjAcDNrdnpunV02eRDMROrAK8=; b=gtj8z+O48rXGlWybpCVS ZJ0vJtnjewLU1fWE3cJGIUFK7gNIeZ8sOSofrotsjJlcOeJQb2Qid8nKuitFIBropIFSXHi2iqhHo G6A4GZDdFiojytdeQq0m8Tx4Yq/Xcv1aSZOkJyfDoTvazoOi9uCNK0Ti/vTA0Xm56dVE8YQPyfjAs /sx5HqWxn+MlXPgZmO0/CRkf1AZ19TxHuf+zQqdCqk8rmlcDWrvuGJHP1ykn2VwJykdQ60ANJkVj5 Myy3O3E8wF18IsbGyEb3n2S5z0bI3ihECRwPeyxkS5e0jU4DiZkCWEzKRktk0EClOVozhHmiLCLe1 ZvN297OdkWdEbw==; Original-Received: from [87.69.77.57] (port=2226 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oShCD-0001Kv-IF; Mon, 29 Aug 2022 12:01:15 -0400 In-Reply-To: (message from Dmitrii Kuragin on Mon, 29 Aug 2022 07:18:43 -0700) 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:241048 Archived-At: > From: Dmitrii Kuragin > Date: Mon, 29 Aug 2022 07:18:43 -0700 > Cc: Gerd Möllmann , > 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 = Emacs`do_scrolling + 485 at scroll.c:271:11, address = 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 (or 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?