emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: macOS metal rendering engine in mac port


From: Aaron Jensen
Subject: Re: macOS metal rendering engine in mac port
Date: Sun, 30 May 2021 00:04:43 -0700

On Sat, May 29, 2021 at 11:27 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Aaron Jensen <aaronjensen@gmail.com>
> > Date: Sat, 29 May 2021 14:40:09 -0700
> > Cc: Alan Third <alan@idiocy.org>, 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]