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: Sun, 30 May 2021 00:04:43 -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> <83zgwd489j.fsf@gnu.org> <83sg244tyk.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="17002"; 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 Sun May 30 09:05:36 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 1lnFVw-0004C2-8L for ged-emacs-devel@m.gmane-mx.org; Sun, 30 May 2021 09:05:36 +0200 Original-Received: from localhost ([::1]:57498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnFVv-0006ce-99 for ged-emacs-devel@m.gmane-mx.org; Sun, 30 May 2021 03:05:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnFVL-0005w4-A3 for emacs-devel@gnu.org; Sun, 30 May 2021 03:04:59 -0400 Original-Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:44851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnFVJ-0006wz-Fs; Sun, 30 May 2021 03:04:59 -0400 Original-Received: by mail-pj1-x102e.google.com with SMTP id h12-20020a17090aa88cb029016400fd8ad8so131302pjq.3; Sun, 30 May 2021 00:04: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=f+uYNt9/D9tASJus2qkmeiU13UmMV6E95XmgIievky4=; b=H2DU2BhqtFxN2CcLWF0poudxSO+f/LH2UM4o9RSyLh3fxViGVdi1x/XvOqPfGSqQ3u 6yF5wOS1Tyu0kjrZ9s3uyqh0A4SwiGKYAnkOW8TBFMaXjWlcGMRHTLUaxhd+GlD9qrCq UpY2C+Y6jdELBfrDaRDMikZyVA9mw3CXiYIxlgv4i9QF5HJpKSJ+IuFyhsrDcK0rX/SQ 0u6ZxDbkFVoUvM0GrN+BtZk1C3NItmP+GYDnx4wXhV5fnkKk8Rdf9/h3OvseGGoYAiqv m1pYf6wZSJmj/hmiOOdZ1fLzauCis8dhw6V/bzjcwA0bN+QhIFrqaSqD5EAN1yeGzI2b QsKg== 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=f+uYNt9/D9tASJus2qkmeiU13UmMV6E95XmgIievky4=; b=jpF7a2z0IvQ3p8KLsKgMc89xxRELUeiT3jWknwHzQyoVaNK83Ep6R3+kTjPZjRCRyp hhbUbcUV204KrHsbivaa/goAGznYBCHHiOP2XIg8AWbTVoJGtOhZ1cY6KFK5oYRmHLAi 4icclFAu/UQw7TXXC4/CgO0+3GfL6n1vV4EWU9UPsrsOALZRPcChNgIWrCKLqIKcnXhr jfCD/CySh5T9suKC5zVdiSIkxoN8wIw1tYSUeIVAMB2EAo/0YfMKvj7TvqKc8r1un6Qa tA9YrDMCTDtyBESRSxYXzL3jYoZbToFExmYMtO9etBK/6Ok9D/aR/4wQp26NuNtarEhA 03RQ== X-Gm-Message-State: AOAM533KHFBMmWsO0ZIj7xx4LLDHew9QNoFuWYehxLRYEHbxaRUNI+ei rPFWraimBEb4pPcBQtwsGNOaLHkuFlUvxUKGmqledbskKRUK/w== X-Google-Smtp-Source: ABdhPJyPRoLRvSOATeMSGCVX8goUj+l++C/1PJCxOh3oT9Ao/iMRYTcXrwJJmCqMPSRxkpYCvlmS+8L5GcjFdjsQ8bE= X-Received: by 2002:a17:902:ea92:b029:103:a022:c545 with SMTP id x18-20020a170902ea92b0290103a022c545mr2322822plb.43.1622358294410; Sun, 30 May 2021 00:04:54 -0700 (PDT) In-Reply-To: <83sg244tyk.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:270116 Archived-At: On Sat, May 29, 2021 at 11:27 PM Eli Zaretskii wrote: > > > From: Aaron Jensen > > Date: Sat, 29 May 2021 14:40:09 -0700 > > Cc: Alan Third , emacs-devel@gnu.org > > > > Here's another benchmark: > > > > (defun type-benchmark () > > (interactive) > > (let ((oldgc gcs-done) > > (oldtime (float-time))) > > (cl-loop for x from 1 to 300 do > > (insert-char ?j) (redisplay)) > > (message "GCs: %d Elapsed time: %f seconds" > > (- gcs-done oldgc) (- (float-time) oldtime)))) > > In a buffer visiting what file? That was in my private ruby file that I've been doing most of my testing in. If I run the test on line 499 of xdisp.c I get: Native, hash, no line numbers: 3756ms Native, hash, line numbers: 4185ms Native, alist, no line numbers: 4810ms Native, alist, line numbers: 7173ms > In "emacs -Q" I get only about 180 calls to > lface_from_face_name_no_resolve when I type a single character, > depending on where in xdisp.c I do that. How many calls do you see > when you just move the cursor to the left or to the right one > character position? On line 500 of xdisp.c, less than 100 with line numbers off, ~1300 with line numbers on. I have 48 lines visible, a mode line with nothing in it, and a header line. If I disable my theme, I get about 9 moving to the right and 2 to the left with line numbers on. Yikes. It's not my faces though, it's my header line that's causing that many calls, possibly because it's triggering a redraw because the column changed? I'm not sure how mode/header lines work when they update. https://github.com/aaronjensen/nano-emacs/blob/master/nano-modeline.el To see the impacts of my theme when line numbers are on: Theme on: 7173ms Header line off: 6900ms Faces default: 6100ms Header off and faces default: 5682ms For comparison, header off and faces default with line numbers off: 3804ms This does tell me I want to stop using inheritance in my theme, but it won't make as big of a difference w/ the hash patch I imagine.