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: Tue, 25 May 2021 15:16:17 +0300 Message-ID: <83bl8zc8ku.fsf@gnu.org> References: <5754E85B-9840-416B-B9C1-E6B2B1FC0114@gnu.org> <80A25FCA-2CF4-433F-B82F-4B37ED5BC6DC@gnu.org> <831r9wdrjr.fsf@gnu.org> <83v978ccbc.fsf@gnu.org> <83sg2cc8m7.fsf@gnu.org> <83pmxgc681.fsf@gnu.org> <83mtskc4zl.fsf@gnu.org> <83lf84c4p7.fsf@gnu.org> <83k0nncznr.fsf@gnu.org> <279F3242-E556-42C9-8489-4DD8F538938E@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3202"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alan@idiocy.org, mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org To: Aaron Jensen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 25 14:17:26 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 1llVzy-0000UU-2o for ged-emacs-devel@m.gmane-mx.org; Tue, 25 May 2021 14:17:26 +0200 Original-Received: from localhost ([::1]:47982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVzv-0002xk-Ti for ged-emacs-devel@m.gmane-mx.org; Tue, 25 May 2021 08:17:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llVyy-0002HO-Vk for emacs-devel@gnu.org; Tue, 25 May 2021 08:16:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43066) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVyw-0000us-CA; Tue, 25 May 2021 08:16:22 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3738 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 1llVyv-0003rR-Uq; Tue, 25 May 2021 08:16:22 -0400 In-Reply-To: (message from Aaron Jensen on Mon, 24 May 2021 23:26:37 -0700) 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:269848 Archived-At: > From: Aaron Jensen > Date: Mon, 24 May 2021 23:26:37 -0700 > Cc: emacs-devel@gnu.org, Alan Third , > YAMAMOTO Mitsuharu > > > > Alan, I could understand why drawing glyphs would take longer (there's > > > more to draw when there are line numbers), > > > > ??? Because line numbers add ~3 glyphs to each line? How can this explain any significant slowdown? Do you see something similar if you add 3 characters to every line and benchmark the scroll? > > I added 3 characters to the end of every line of xdisp.c (//1) and it > went from 7.2s to 8.4s -- 17% (emacs -Q, no line numbers). The 17% is about twice what I'd expect, since adding 3 characters to each line of xdisp.c enlarges its text by only 9.3%. > The timing differences are primarily in display_line. gui_write_glyphs > is 15% slower, which is nowhere near 576ms. Profile attached. > > That certainly doesn't match the 78% slower for drawing glyphs in the > line number scenario. > > Any suggestions on what to try next? The numbers are so against my intuition that I'm not even sure in which direction to think... How did you compile Emacs? which compiler and what compiler and linker switches? And what kind of CPU do you have there? I'm looking for something that could explain why parts of code that should take like 20% of the total redisplay time are so dominant in your case. Alan, do you see similar numbers (in percents) to what Aaron reports? Or is that something peculiar to his system?