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, 22 May 2021 19:30:24 +0300 Message-ID: <83o8d2k9y7.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7997"; 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 Sat May 22 18:31:38 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 1lkUXJ-0001rs-8D for ged-emacs-devel@m.gmane-mx.org; Sat, 22 May 2021 18:31:37 +0200 Original-Received: from localhost ([::1]:33504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkUXI-0005hM-9Y for ged-emacs-devel@m.gmane-mx.org; Sat, 22 May 2021 12:31:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkUWD-0004zc-H6 for emacs-devel@gnu.org; Sat, 22 May 2021 12:30:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33930) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkUW9-0006SI-Tj; Sat, 22 May 2021 12:30:25 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1468 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 1lkUW9-0005pp-1s; Sat, 22 May 2021 12:30:25 -0400 In-Reply-To: (message from Aaron Jensen on Sat, 22 May 2021 09:01:03 -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:269617 Archived-At: > From: Aaron Jensen > Date: Sat, 22 May 2021 09:01:03 -0700 > > While profiling this, many signs point to line number display being a > hot spot when display-line-numbers-mode is enabled. Specifically, > maybe_produce_line_number calling merge_faces. Ultimately, most of the > time is spent in TAGGEDP which is called by CONSP in assq_no_quit. > > Here's a reverse tree: https://cln.sh/nLrew6 This profile is shown in reverse, so it's hard to interpret it. Are the numbers cumulative, or are they self-percents? If the latter, I cannot understand why CONSP is such a hot spot, it sounds improbable. Did you customize the line-number face? if so, what happens if you don't? If you didn't customize the face, I don't think I understand why we need to spend so much time in face-merging. Or maybe you have a lot of faces defined? Also, if you run the scroll-benchmark with and without line numbers, how much do the results differ? > Is there anything that can be done for caching the merged face? Emacs always caches every face it realizes, so that is already done. Unless you have some Lisp hooks that somehow invalidate the face cache, what you see is with the face cache being used. Anyway, what you see sounds strange. When I added display-line-numbers, I measured the effect on redisplay and found it negligible. About the only situation where it was tangible was with visual-mode line numbers, and even then the slowdown was around 10%. So I don't know how to explain what you perceive as significant slowdown.