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: Sat, 29 May 2021 14:05:58 -0700

On Sat, May 29, 2021 at 2:03 PM Aaron Jensen <aaronjensen@gmail.com> wrote:
>
> On Sat, May 29, 2021 at 1:03 PM Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > > From: Aaron Jensen <aaronjensen@gmail.com>
> > > Date: Sat, 29 May 2021 12:30:49 -0700
> > > Cc: Alan Third <alan@idiocy.org>, emacs-devel@gnu.org
> > >
> > > > 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.
> >
> > In a 64-bit optimized build, assq_no_quit's loop body is just 10
> > machine instructions.  With 1200 faces, searching all of them once
> > should take something like 500 nanoseconds, i.e. 0.5 microsecond.
> > Does this match the times you see and the number of times the function
> > is called?
> >
> > Also, please note that typing a single character redisplays just one
> > line, the one where point is.  That perhaps needs to merge 4 or 5
> > faces.  So I'm not sure how come this could add 10ms to every
> > keypress: you'd need 20,000 calls of assq_no_quit to account for 10ms.
> > How come we call assq_no_quit 20k times when processing insertion of a
> > single character?
>
> So with a single keypress I see:
>
> 6,000 lface_from_face_name_no_resolve
> 19,000 assq_no_quit
>
> So yeah, that about accounts for 10ms

If I'm quicker on the count, I see only about 9,000 assq_no_quit.
Immediately thereafter another 10,000 or so go by, so maybe I can only
attribute 9,000 w/ a keypress.

There are only about 4,000 when line numbers are disabled using the
same config. (all this is without the hash patch)



reply via email to

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