From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.devel Subject: Re: macOS metal rendering engine in mac port Date: Mon, 24 May 2021 01:07:42 -0700 Message-ID: References: <831r9xjrho.fsf@gnu.org> <5754E85B-9840-416B-B9C1-E6B2B1FC0114@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4714"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Third , YAMAMOTO Mitsuharu , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 24 10:09:31 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 1ll5eV-0000wu-J6 for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 10:09:31 +0200 Original-Received: from localhost ([::1]:42472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll5eU-0007W9-6k for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 04:09:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll5d7-0006ny-MN for emacs-devel@gnu.org; Mon, 24 May 2021 04:08:05 -0400 Original-Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:36733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ll5cy-0006jT-4H; Mon, 24 May 2021 04:08:04 -0400 Original-Received: by mail-pg1-x52e.google.com with SMTP id 27so18230141pgy.3; Mon, 24 May 2021 01:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=sV+XY9oKZ6NVju5mA8PFm7t3LCMj0vcdlAXLc/o96DQ=; b=uYs3rFJXQmgBuq6OyvjTAI5ph+makKMmumedzq+By6Fri84kr/FvT9MEdGmct3e8ju m61UlZMpBJ4QZhC2qtZSGwcqrGOewlPggUEAyffcor5Vtn+5Y0cktYl3ROFdtpoR0Mbt 3W0iFYXvH8fHdB2cjkaxoqrOr8ENE7OVm8xKaRMxbGLWh2bJgKII6X1ZC2Manq8Q3LxP ecbCkv4zFf69MWdIsjt9/jI2upfFURjYZUPVrswgOxlACH1OgUHsNMsD0BL12v/1GoP+ YqsdzfedIPdcqUmCatqeNeSVQKJApDNsa9ONCLWBXRqVKQI5hf293GhWyHudFQ8vBf4A js/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=sV+XY9oKZ6NVju5mA8PFm7t3LCMj0vcdlAXLc/o96DQ=; b=Mkxg209NBQv/v3V1rqpMWA2tQbM7MlcQlSoLjRIGS97gVGuL9KLQA45556OMJXZVuW QLmdab67ys5cBvEoMNjq31Dyo5iEZYGhbncipR+HN0kbTlj0ZrR07Xn8csHr7rcQR1Sz AwEwyuk8P8x4GBt9XajmsJlZci9ffPUYvRkOkr+buPCaUdZ2RRR/ZSkVdZKw9glGv8he 3p56lwk3MyEMB7O5VvrqN40HRjM56JmNHWGSTxafs6+X1eBBv0tuhS8ba7ikdP8oHbP/ ISvhWtrW1qTjxlsBYm1ynKvZ02V6ytbCcnDiKT9UsfIN5AF3nZpZ6H0kSAw2xRrOVN4r ZFEA== X-Gm-Message-State: AOAM5323zPnnmF6mnPTBLCGlsiy9GqolWdgPcA24pjBpGee5hFuqGNRm q+Kze8naESyD0UteChA45/cUgSp2qbhEWUqGGwS7zu59V3DmXg== X-Google-Smtp-Source: ABdhPJz1490+E/C+dFkjBmXs13MmMpXbkottxZQJy5EO1eJMKvC8uLHv0saujldtDVK+WpxZKqHqBm7B2FO0V7Z403A= X-Received: by 2002:a63:4662:: with SMTP id v34mr9780611pgk.358.1621843673362; Mon, 24 May 2021 01:07:53 -0700 (PDT) In-Reply-To: <5754E85B-9840-416B-B9C1-E6B2B1FC0114@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=aaronjensen@gmail.com; helo=mail-pg1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:269735 Archived-At: On Mon, May 24, 2021 at 12:37 AM Eli Zaretskii wrote: > > Why does it look suspect to you? Don't you also see the same code called= to process the other faces in the buffer? What looks suspect is that the exact same call is made so many times for the exact same faces and that call gets slower proportional to the number of faces you have because of the linear search. Fewer faces =3D=3D less work, and when something is called so many times it may be worth further optimization or caching. > An Emacs face that is identified by name needs to be converted to the col= lection of the face's attributes, so that Emacs could merge faces and displ= ay them. This is what lface_from_face_name does. And it does that for any= face specified in the buffer by its symbol. So how come addition of just = one face and a few characters which have that face have such a profound eff= ect in your case? I'm not sure I track your last question. In my case it's the addition of 400-600 faces, none of which are used in the buffer. They just exist in the alist that lface_from_face_name_no_resolve scans with assq_no_quit. This is why TAGGEDP via CONSP is a hotspot in my code, because it's called 600 * 700k (or some multiple thereof) times or so. assq_no_quit via merge_faces accounts for 1.43s of 6.94s in one of my profiles.