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.devel Subject: Re: macOS metal rendering engine in mac port Date: Sun, 23 May 2021 22:20:49 +0100 Message-ID: References: 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="24028"; mail-complaints-to="usenet@ciao.gmane.io" Cc: YAMAMOTO Mitsuharu , emacs-devel@gnu.org To: Aaron Jensen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 23 23:22:48 2021 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 1lkvYe-0006AA-Nd for ged-emacs-devel@m.gmane-mx.org; Sun, 23 May 2021 23:22:48 +0200 Original-Received: from localhost ([::1]:39998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkvYd-0005Wb-Gw for ged-emacs-devel@m.gmane-mx.org; Sun, 23 May 2021 17:22:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkvXn-0004qV-3t for emacs-devel@gnu.org; Sun, 23 May 2021 17:21:55 -0400 Original-Received: from [217.169.17.33] (port=57849 helo=breton.holly.idiocy.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkvXk-0002RO-QQ for emacs-devel@gnu.org; Sun, 23 May 2021 17:21:54 -0400 Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 1BD34202C1E32C; Sun, 23 May 2021 22:20:49 +0100 (BST) Mail-Followup-To: Alan Third , Aaron Jensen , emacs-devel@gnu.org, YAMAMOTO Mitsuharu Content-Disposition: inline In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 217.169.17.33 (failed) Received-SPF: none client-ip=217.169.17.33; envelope-from=alan@breton.holly.idiocy.org; helo=breton.holly.idiocy.org X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:269704 Archived-At: On Sun, May 23, 2021 at 10:06:35AM -0700, Aaron Jensen wrote: > On Sun, May 23, 2021 at 9:13 AM Aaron Jensen wrote: > > > > I've been using it and haven't seen any flickers. I'll continue using > > it and report back. I probably would have seen one by now. > > So one important note, I'm selling my 5k2k giant monitor so it's boxed > up (if anyone is interested, email me :) ). I'm on a 24" 4k monitor > now running at 1920x1080 scaled, whereas before I was at 3008x1269. > > So, this morning when I run the scroll-up-benchmark it does what the > macport did. That is, it looks like it hangs for a second, shows maybe > 1 or two scrolls and then jumps to the bottom. Told you I'd back-port that fix. ;) I've seen similar, but only when I start the benchmark then click on another window. My thinking was that macOS was seeing I'm no longer using it and put it into some low-performance mode. But clicking back in the window doesn't fix it. I've no idea what's going on and I've only seen it happen when using the benchmark so I've not investigated. > I get roughly 2.3s w/ line numbers and 1.16 without. > > On the new surface-stuff branch, I get 4.7s w/ line numbers and 2.98s w/o. I've made surface-stuff as much like the (non-metal) mac port as I possibly can. I'm not seeing any difference. I've put an NSLog at the start of keyDown and another at the end of updateLayer, and the time difference is pretty consistently about 3ms, so I don't think the NS port's IO is slow. That leaves the time between the key being hit and the NS port registering it, which I don't think we can do anything about, or the time between us passing the IOSurface to the system and it actually displaying, which should be identical to the Mac port, unless it's using some sneaky setting I've yet to discover. If it's still laggy, I've got absolutely no idea. -- Alan Third