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.devel Subject: Re: macOS metal rendering engine in mac port Date: Sat, 29 May 2021 12:39:27 +0300 Message-ID: <83v9716fqo.fsf@gnu.org> References: <83k0ni6pje.fsf@gnu.org> <83eedq6mvm.fsf@gnu.org> <83y2bx6gct.fsf@gnu.org> <83wnrh6fur.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32662"; mail-complaints-to="usenet@ciao.gmane.io" Cc: aaronjensen@gmail.com, emacs-devel@gnu.org To: alan@idiocy.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 29 11:39:52 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 1lmvRf-0008JO-Oi for ged-emacs-devel@m.gmane-mx.org; Sat, 29 May 2021 11:39:51 +0200 Original-Received: from localhost ([::1]:60686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmvRd-0000EO-Mw for ged-emacs-devel@m.gmane-mx.org; Sat, 29 May 2021 05:39:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmvRA-0007zs-UG for emacs-devel@gnu.org; Sat, 29 May 2021 05:39:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39646) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmvR9-00057N-CL; Sat, 29 May 2021 05:39:19 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1575 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 1lmvR8-0007Sw-UR; Sat, 29 May 2021 05:39:19 -0400 In-Reply-To: <83wnrh6fur.fsf@gnu.org> (message from Eli Zaretskii on Sat, 29 May 2021 12:37:00 +0300) 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:270046 Archived-At: > Date: Sat, 29 May 2021 12:37:00 +0300 > From: Eli Zaretskii > Cc: aaronjensen@gmail.com, emacs-devel@gnu.org > > > Date: Sat, 29 May 2021 10:32:00 +0100 > > From: Alan Third > > Cc: aaronjensen@gmail.com, emacs-devel@gnu.org > > > > Yes, I think that's what I'm talking about. There's a lot of code like this: > > > > struct face *face = FRAME_DEFAULT_FACE (f); > > [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f) set]; > > > > and > > > > if (s->hl == DRAW_MOUSE_FACE) > > { > > face = FACE_FROM_ID_OR_NULL (s->f, > > MOUSE_HL_INFO (s->f)->mouse_face_face_id); > > if (!face) > > face = FACE_FROM_ID (s->f, MOUSE_FACE_ID); > > } > > else > > face = s->face; > > > > Which I don't think is present in the other terms, because, as I say, > > they look them up in one function rather than spread out throughout > > the term's code. > > I cannot see why this would be a problem. First, FACE_FROM_ID and > FACE_FROM_ID_OR_NULL simply access a face by direct indexing into the > frame's face cache, so it's just a couple of CPU instructions. And > second, I see very similar code in other *term.c sources, so I don't > think nsterm.m does it very differently. Of course, what I say above doesn't include ns_lookup_indexed_color, so maybe that could explain some slowness?