[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 12:30:49 -0700 |
On Sat, May 29, 2021 at 11:40 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Aaron Jensen <aaronjensen@gmail.com>
> > Date: Sat, 29 May 2021 11:22:06 -0700
> > Cc: Alan Third <alan@idiocy.org>, 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
- Re: macOS metal rendering engine in mac port, (continued)
- Re: macOS metal rendering engine in mac port, Eli Zaretskii, 2021/05/29
- Re: macOS metal rendering engine in mac port, Dmitry Gutov, 2021/05/29
- Re: macOS metal rendering engine in mac port, Eli Zaretskii, 2021/05/29
- Re: macOS metal rendering engine in mac port, Dmitry Gutov, 2021/05/29
- Re: macOS metal rendering engine in mac port, Stefan Monnier, 2021/05/29
- Re: macOS metal rendering engine in mac port, Eli Zaretskii, 2021/05/29
- Re: macOS metal rendering engine in mac port, Eli Zaretskii, 2021/05/29
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/29
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/29
- Re: macOS metal rendering engine in mac port, Eli Zaretskii, 2021/05/29
- Re: macOS metal rendering engine in mac port,
Aaron Jensen <=
- Re: macOS metal rendering engine in mac port, Eli Zaretskii, 2021/05/29
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/29
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/29
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/29
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/30
- Re: macOS metal rendering engine in mac port, Eli Zaretskii, 2021/05/30
- Re: macOS metal rendering engine in mac port, Eli Zaretskii, 2021/05/30
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/30
- Re: macOS metal rendering engine in mac port, Eli Zaretskii, 2021/05/30
- Re: macOS metal rendering engine in mac port, Aaron Jensen, 2021/05/30