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: Sat, 29 May 2021 12:30:49 -0700 Message-ID: References: <83k0ni6pje.fsf@gnu.org> <83eedq6mvm.fsf@gnu.org> <83zgwd6gk3.fsf@gnu.org> <83bl8t5vu6.fsf@gnu.org> <83a6od5tqh.fsf@gnu.org> <834kel5qp3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11251"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Third , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 29 21:32:58 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 1ln4hd-0002jf-MH for ged-emacs-devel@m.gmane-mx.org; Sat, 29 May 2021 21:32:57 +0200 Original-Received: from localhost ([::1]:40182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln4hb-0008QH-W8 for ged-emacs-devel@m.gmane-mx.org; Sat, 29 May 2021 15:32:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln4fp-0007hn-Rm for emacs-devel@gnu.org; Sat, 29 May 2021 15:31:05 -0400 Original-Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:52161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ln4fn-0002hs-9w; Sat, 29 May 2021 15:31:05 -0400 Original-Received: by mail-pj1-x102e.google.com with SMTP id k5so4393700pjj.1; Sat, 29 May 2021 12:31:02 -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; bh=jHNcB+WntTZpInVxPoBz1GWbNzrb58XHgz/8avl81/8=; b=DSigAcFrgevO9nlbiid9kr3KWJKy8Qvp3mQvpAVwxU9nwbFD+uT/0S5Cu3OIRCry5F //w/xXH1lG+BVjZEHoTtRCcVdvtlB8qUCLADT8UvIdWiHZNIuLnw3NXJHhGt/Q3rxYKA /d9Al8DNZLg3zXps/pwxzRlxV7aApPgoISFPHSYu9xk/eL6hRBn+lP+PuSXi3kH5sXu4 EV3aqJY3O6h6oZ/EbGF2oY0/+5E2Cw0OrQVg8LiqlCjS7f0vM7jdql0VajzT5+dY7H5o WTDF4t/xrpr5wZG1cS9HDx/QhLrw1zv3ufhy2sh8t/DdTF7whVzG1Ajjq5ARNlIQbWMy PgZg== 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; bh=jHNcB+WntTZpInVxPoBz1GWbNzrb58XHgz/8avl81/8=; b=Bie73ExA4iWwc1imAwUGbwMwA6DINbjnzzh4cDZAcZ92vQ4sr9G2RsHAv/nKi6mzlI JSieLXcxHfniqDczla8nh/mNzD+qsmzxc2gLaAtJFyI2n6PW1/aXulU0uXlpgHbInPSf URPAJcgpvPAr/t7tqo68QFcDiIQMWVqdibsfCdqBtMUI37eU8+qBKMDIxEZM7n1l7bOU EKEBiycmaB/rYpk0hAmXW9OkmaRUuSuHNk4F9vmtTMYdqkOJzh72ROVABVdcbZagPiXE MfZ4mUxvf55H08GlTc+N/ioHSgZaTVVsa8gZzUeHo4kmk94qs8XsSFgPxsPqVQdtyeUK +jEg== X-Gm-Message-State: AOAM531wuZEc8pArzU3mMepnaEIXQdu2bRsl6ufUT6D+UmdWJj3ZUfj7 5o19TocFUo80QDAl5as+qPY5T8H5k1bHh+9NFvh4twkaxhE= X-Google-Smtp-Source: ABdhPJzHcMRtTqPKw7J44fiIz14lFtN+xWHvCeqpJQ1Cx7G3q96IaZwkPmJbABvTP8awLnarNIkfWUggwo56Rb6r7cU= X-Received: by 2002:a17:90b:350a:: with SMTP id ls10mr11036488pjb.181.1622316660835; Sat, 29 May 2021 12:31:00 -0700 (PDT) In-Reply-To: <834kel5qp3.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=aaronjensen@gmail.com; helo=mail-pj1-x102e.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:270096 Archived-At: On Sat, May 29, 2021 at 11:40 AM Eli Zaretskii wrote: > > > From: Aaron Jensen > > Date: Sat, 29 May 2021 11:22:06 -0700 > > Cc: Alan Third , emacs-devel@gnu.org > > > > > Its being significant is what surprises me. The linear search in > > > assq_no_quit should be very fast, as it requires just a few machine > > > instructions per member. You yourself say your profile says it takes > > > 15ms to call that function 500k times. How can extra 15ms be so > > > significant? > > > > I did not say this. 500k times, according to the benchmarks I > > provided, take over 2s. It's only 15ms to do 500k _hash lookups_. > > OK, but still: assq_no_quit should be very fast. Sure, it's fast when you call it once, but it's not being called once. It's being called enough times that it adds 10ms to every key press when I have line numbers on and 1000+ faces. > > > Is it possible that many of the 1200 faces you have inherit from other > > > faces, perhaps recursively? > > > > My theme is set up like this: > > https://github.com/aaronjensen/nano-emacs/blob/master/nano-theme.el > > I see a lot of :inherit there. I'm quite sure this exacerbates the > problem, as each :inherit needs to recursively search for and access > the attributes of the parent face. It only navigates the parent when the face matches, yes? So in my case, line-number inherits from shadow, which inherits from nano-face-faded. So I add an extra hop in there for each of those face lookups. > > About perceiving typing latency, have you read this article: > > https://pavelfatin.com/typing-with-pleasure/ > > Yes. Okay, it sounds like you and I just fall into different personal perception/preferences categories. In any case, the hash table lookup makes a perceptible and much appreciated difference for me, so thank you and thanks to everyone else who contributed to that. Also, thanks Alan for the changes in surface stuff, they seem to help as well. Thanks, Aaron