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 12:07:44 -0700 Message-ID: References: <831r9xjrho.fsf@gnu.org> <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> 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="11855"; 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 21:08:37 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 1llFwK-0002tO-LT for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 21:08:36 +0200 Original-Received: from localhost ([::1]:48236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llFwJ-0002ff-Nu for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 15:08:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llFvj-0001gj-Co for emacs-devel@gnu.org; Mon, 24 May 2021 15:07:59 -0400 Original-Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:35469) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llFvh-0006l9-OZ; Mon, 24 May 2021 15:07:59 -0400 Original-Received: by mail-pg1-x535.google.com with SMTP id m190so20815955pga.2; Mon, 24 May 2021 12:07:56 -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=rQdCinQULfugWovKlCzznBeWXK462E/bQcgzvc29HO8=; b=tXkiBVFp1voM4xuS2FcefOvO0GK6DQISJdEsbvoUwzg4CqvtnvUeyqqUN1uwsYVz9e M5hVvtUv/rWAkZvEgpITTHbFrL+xiKyBtKdBMVHHdJ3duCL5a4aWwU1CAUvq8bVc+CdH 0OozI5/vptHroCSkxAhER4yscRw3CXjGOCJBp6ZysidhVauUFh9USW0D9SVtl0kSblzV qvZqJNXWd5OOn4zkJO3Z6GN2dIiuvxBx5o9bkpagJ0PYSOiXoS1vHrh46zfb6RTYlSwH 1x7HNDtwEdqPm+s4u6vPOExx70pwgWcngdR5Tw6YFHAC9tAUfSBSzJDgWM0DYYtrOg0E T1eQ== 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=rQdCinQULfugWovKlCzznBeWXK462E/bQcgzvc29HO8=; b=HtJlpZSxtyPZfQ3wJHgnyyd0DlSNt10M3V/oBZUXwh4dB0vFL5X21vdk8QbeAJ+s5O tk82NcEnwCMm5zHdTJ8JZZCWy1iVJ9Zctue+QYaSI5JJBHj0EXd5747hgDPB5wvOzXpB ztBrCHvbx+QD8Mfigzmf/VgjwGfr+HN6JnPRJgrksWNYJYHgG75Az02qOkR36A7QQtKk FK7LpquyiXw7OFF8kpRMfJjWUnv90i4Czc7m9BaM9DVZb72AOSjf1VKNOgN1eJeAwZb1 2BdMPXlJrQxqOQiouVAVuTbGtN844TQiYQn/WbHdKY7dS4ZP2T9DbWHb8mtC8GV5eBCg 4X/w== X-Gm-Message-State: AOAM533soe9UXi9lxEqTeVJNA0aiqV6zSgCncDZdcFLnSH5PBctrDqyp fl+K/myB+nAjy/ytDryeVsyU61TAjONhxHzuQ/1nuzMBcOi+5Q== X-Google-Smtp-Source: ABdhPJwHeT2TBi5oWVJqVK3sjztyC3/qI6KG3qV0u6Iq//qPvRu1vwhL75tAEeN+ShKaS6wbv09iH0Kf+bJhBrbaKXM= X-Received: by 2002:a62:c541:0:b029:2e8:c7c7:d96e with SMTP id j62-20020a62c5410000b02902e8c7c7d96emr8207399pfg.26.1621883275255; Mon, 24 May 2021 12:07:55 -0700 (PDT) In-Reply-To: <83pmxgc681.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=aaronjensen@gmail.com; helo=mail-pg1-x535.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:269796 Archived-At: On Mon, May 24, 2021 at 11:55 AM Eli Zaretskii wrote: > > That's not the interesting comparison of numbers, because this > function is called recursively. What is important is that > merge_face_ref is called on behalf of buffer faces roughly the same > number of times as merge_face is called on behalf of line numbers: > about 130,000 to 140,000 for scrolling through xdisp.c. IOW, the > number of face merges is doubled, it doesn't become 6-fold. Okay, is there something else you want me to measure? > Thus, the slowdown you see in "emacs -Q" is still a mystery for me, > because face merging is far from being the most expensive part of > redisplay. lface_from_face_name_no_resolve is called 4.5x more often when line numbers are enabled and that's enough to make a difference on my machine. > Maybe there's something NS-specific here, I don't know. I cannot > explain what you see, and I don't see it on my system. Could you try adding 500 extra (unused) faces and try the comparison again? The slowdown scales along with the number of faces, so your linux build may just be better optimized for this particular scenario. > If you turn on highlight-regexp mode, and use regexps that match about > 2 times on each line, do you also see a similar slowdown in the > scrolling benchmark? For example, highlight two regexps: "^." and > ".$". This should create the same addition of face merges per line as > with line numbers, and so the effect should be similar -- if indeed > the reason is face merges and not something else. In my testing, > scrolling through xdisp.c with the above 2 regexps highlighted takes > just 2% more time than without them, similar to what I see when I turn > on line numbers. emacs -Q No highlights: 5.47s (slower likely because i'm on master now instead of Alan's branch) With highlights: 9.4s So yes, a similar slowdown for me.