From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third 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 18:22:51 +0100 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6809"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , 63187@debbugs.gnu.org, Eli Zaretskii , Aaron Jensen To: Kai Ma Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 08 19:24:21 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 1q7JMy-0001VS-Rp for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Jun 2023 19:24:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7JMi-0005he-Mg; Thu, 08 Jun 2023 13:24:04 -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 1q7JMg-0005gg-Br for bug-gnu-emacs@gnu.org; Thu, 08 Jun 2023 13:24:02 -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 1q7JMg-0001N4-2y for bug-gnu-emacs@gnu.org; Thu, 08 Jun 2023 13:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7JMf-0000Bt-Uv for bug-gnu-emacs@gnu.org; Thu, 08 Jun 2023 13:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Jun 2023 17:24:01 +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.1686244982645 (code B ref 63187); Thu, 08 Jun 2023 17:24:01 +0000 Original-Received: (at 63187) by debbugs.gnu.org; 8 Jun 2023 17:23:02 +0000 Original-Received: from localhost ([127.0.0.1]:57463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JLi-0000AL-3E for submit@debbugs.gnu.org; Thu, 08 Jun 2023 13:23:02 -0400 Original-Received: from dane.soverin.net ([185.233.34.149]:40753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JLf-00009X-HM for 63187@debbugs.gnu.org; Thu, 08 Jun 2023 13:23:00 -0400 Original-Received: from smtp.soverin.net (c04smtp-lb01.int.sover.in [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dane.soverin.net (Postfix) with ESMTPS id 4QcWHx3g76zyj7; Thu, 8 Jun 2023 17:22:53 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.100]) by soverin.net (Postfix) with ESMTPSA id 4QcWHx0KqLzFv; Thu, 8 Jun 2023 17:22:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1686244973; bh=ndd0va7hXu9LOV7ve8UxaA0OeWueHMsICtJaLQXFm4k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dWlVpqgLWKU1/IHDy2kZQRCEBxJfUxKH6bu+zKVo5n7d0PxYMgZvTXrzPQaTSo624 WZMBr85pE+52SVDVb0pI3CEMPy6e9mt3P3WJxeYtmBupj+aRZ1q5Vd3XGCqGx4ZgKa SNYKyZzd3iEx1rejaN2rIlrsiVrFz+47wK3xop5Gr9qDQ2rnBFh18WP7tXOOLYATju BHscgxayh4WWtlMqnHqp4Uban4SDqzGs3RNTB1OE86imYfLRAF9Gf2kufCQfhSX3Wr sxPcqFk5gNxYoszPJA8VHisVxTiJm8ws3N47ncm5V529yMxvsVGxZskVVAi2SY0glc OlWyGZhhS+yxw== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95) (envelope-from ) id 1q7JLX-000NfW-Mk; Thu, 08 Jun 2023 18:22:51 +0100 X-Soverin-Authenticated: true Mail-Followup-To: Alan Third , Kai Ma , 63187@debbugs.gnu.org, Eli Zaretskii , Po Lu , Aaron Jensen Content-Disposition: inline In-Reply-To: <76A3A6C3-CD32-4731-927C-349471F21801@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:263135 Archived-At: 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 = 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. -- Alan Third