From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#63187: 30.0.50; Tail of longer lines painted after end of nearby lines on macOS Date: Thu, 8 Jun 2023 22:47:33 -0400 Message-ID: References: <83jzxiawsp.fsf@gnu.org> <83r0rk9w1r.fsf@gnu.org> <831qjdx4to.fsf@gnu.org> <50104E0C-A861-4762-8081-55F2CF2390AD@gmail.com> <76A3A6C3-CD32-4731-927C-349471F21801@gmail.com> <2A505E20-55E2-4788-A21C-B94068299E50@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12584"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , Alan Third , Eli Zaretskii , 63187@debbugs.gnu.org To: Kai Ma Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 09 04:48:17 2023 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 1q7SAj-00035r-Eg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Jun 2023 04:48:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7SAX-0002yw-5Z; Thu, 08 Jun 2023 22:48:05 -0400 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 1q7SAV-0002yn-BB for bug-gnu-emacs@gnu.org; Thu, 08 Jun 2023 22:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7SAU-0002ie-NR for bug-gnu-emacs@gnu.org; Thu, 08 Jun 2023 22:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7SAU-0006Rm-Ii for bug-gnu-emacs@gnu.org; Thu, 08 Jun 2023 22:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Jun 2023 02:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63187 X-GNU-PR-Package: emacs Original-Received: via spool by 63187-submit@debbugs.gnu.org id=B63187.168627887424722 (code B ref 63187); Fri, 09 Jun 2023 02:48:02 +0000 Original-Received: (at 63187) by debbugs.gnu.org; 9 Jun 2023 02:47:54 +0000 Original-Received: from localhost ([127.0.0.1]:57962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7SAL-0006Qc-VK for submit@debbugs.gnu.org; Thu, 08 Jun 2023 22:47:54 -0400 Original-Received: from mail-qk1-f178.google.com ([209.85.222.178]:45289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7SAJ-0006Pj-Ba for 63187@debbugs.gnu.org; Thu, 08 Jun 2023 22:47:52 -0400 Original-Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-75d4aa85303so115682685a.2 for <63187@debbugs.gnu.org>; Thu, 08 Jun 2023 19:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686278865; x=1688870865; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=i3qVh7Xf1/bjFb/DyEGH1oMtvP46j1V25qh/94GxBs4=; b=KWldt7fBvyeXlkOQCBxoS6/spm6PiM9KrkA0prQljO88oPkoBRQpRqfgAX/rQidlcK ryjJT9OxeH8Gd+7vkgviYjc0j9IbP5bXiy5+7xJevsoc8b7NzfH4g6oZ0az07XLIJTXv vzTpo/DYDK08s+/v9BH5OnbGlQeYPwiDVQqunPivY7X566QOxwsgM2mV7la28pTNvCYj TfwBsM8Qgx9zZsUPIytJL+9J2DSVgtzWpQA5xOIrLAsUc5nYnTwW27gEiJRmn2ldANTN LXSbKAlZkHpUkT+PlliCy5M2dfwNpEmmetPPX/EBC5IaUmHp0BnGxPKBb4OXjWwSrijZ oi2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686278865; x=1688870865; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i3qVh7Xf1/bjFb/DyEGH1oMtvP46j1V25qh/94GxBs4=; b=XFCnlQEmS0KBjR6WG+BqXI9+lw2oK9RFw5/yRQcN5G6vLnw5dXFcqHNTlNLddxlFSt xmtpxtKffWHOW1pf8fdxUKwl09U2NoV8iF1bCCPLjCYdbT9zMMnmTxX0aMrpHWnAI2XR lAIspBB0D8WqJ698B3VMIIHt0WLfVjbDTngpT572H3iaZoL04hDFQcOpBq2qHafB+Okv T8shydMrpCk2cs6NJidGFshjG7QtvVweRA+yf3VyJmPWZG4iTHO5WehCYd/OZY9hDkFP ZnNAE7Ui44Dw3SzwazLHMae4wmLjoKJg5a5/Samth++LnGtu5sdVKDU5ix8mRZriWneK Zhiw== X-Gm-Message-State: AC+VfDxHKKpaqGQ0zJ9DPq+NC0t92HQPqmoqjCNTkEE93axLOrfvILqe 0LotILlJm1nMp7TtGP8tHs3UbvA5kbskFDML3RAggB2How4= X-Google-Smtp-Source: ACHHUZ7oJhsUFKVOxxcQcMsxBR8mcDIh7UccRpAYTOa/9JzFfOOjTfINvns0tHaQIJbowkffHG21ldCxD8tEgUkaeqM= X-Received: by 2002:a05:620a:8a01:b0:75e:d8db:5f4 with SMTP id qt1-20020a05620a8a0100b0075ed8db05f4mr6950783qkn.11.1686278865220; Thu, 08 Jun 2023 19:47:45 -0700 (PDT) In-Reply-To: <2A505E20-55E2-4788-A21C-B94068299E50@gmail.com> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263150 Archived-At: On Thu, Jun 8, 2023 at 10:42=E2=80=AFPM Kai Ma wrote: > > > > > On Jun 9, 2023, at 01:22, Alan Third wrote: > > > > On Thu, Jun 08, 2023 at 10:57:43PM +0800, Kai Ma wrote: > >> > >> > >>> On Jun 8, 2023, at 21:42, Kai Ma wrote: > >>> > >>> > >>>> On Jun 8, 2023, at 20:51, Alan Third wrote: > >>>> > >>>> I've got two things it could be worth trying to see if they make any > >>>> difference. > >>>> Change the CACHE_MAX_SIZE to something greater than 2, probably 4 is= a > >>>> good number. That would rule out some sort of locking problem, as it > >>>> would reduce the chance a surface would be re-used before it's been > >>>> sent to the screen. > >>>> > >>>> The downside of this is probably going to be an increase in "lag" > >>>> because it's possible to have more surfaces "in-flight". > >>>> > >>>> The other option is to remove this call (nsterm.m:10636): > >>>> > >>>> /* Schedule a run of getContext so that if Emacs is idle it will > >>>> perform the buffer copy, etc. */ > >>>> [self performSelectorOnMainThread:@selector (getContext) > >>>> withObject:nil > >>>> waitUntilDone:NO]; > >>>> > >>>> I think this is harmless, but it's in there as I *assume*, with > >>>> absolutely no proof, that it will improve performance and it seems > >>>> possible (but I think unlikely) that it may affect the sequencing of > >>>> surface operations. > >>> > >>> Tested locally. I can confirm that removing > >>> performSelectorOnMainThread (with CACHE_MAX_SIZE =3D 2) fixes the > >>> problem for me. I now observe zero glitches or tearings! > >>> > >> > >> Sorry, I concluded too fast. I can still see tearings, though very > >> rarely. So this is still not a real fix. :-( > > > > Try increasing CACHE_MAX_SIZE too. Tearing would, I believe, be > > because a surface is being reused while it's still being copied to the > > VRAM, so you'll see a partially modified output. > > > > If increasing CACHE_MAX_SIZE fixes it then there are a couple of > > possible options we can look at. > > Increasing CACHE_MAX_SIZE alone doesn=E2=80=99t seem to help much. > (Screencast: https://www.youtube.com/watch?v=3D9YD9jyP-GKw) > > Increasing CACHE_MAX_SIZE + Removing performSelectorOnMainThread seems to= be better but I can=E2=80=99t be sure. Just observed: > > (1) M-< at the mid of a buffer, but only the first line of the view is re= freshed, and other parts were still there. > > (2) selecting a region doesn=E2=80=99t always clear the hl-line effect. What are you doing to make your background translucent? I've never seen anything nearly as bad as what you have. I've only seen a glitch maybe once since the last patch (and that may have even been something else). It makes me wonder if there's something else different/off about your setup. Aaron