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: Eli Zaretskii
Subject: Re: macOS metal rendering engine in mac port
Date: Tue, 25 May 2021 15:16:17 +0300

> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Mon, 24 May 2021 23:26:37 -0700
> Cc: emacs-devel@gnu.org, Alan Third <alan@idiocy.org>, 
>       YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> 
> > > Alan, I could understand why drawing glyphs would take longer (there's
> > > more to draw when there are line numbers),
> >
> > ??? Because line numbers add ~3 glyphs to each line?  How can this explain 
> > any significant slowdown?  Do you see something similar if you add 3 
> > characters to every line and benchmark the scroll?
> 
> I added 3 characters to the end of every line of xdisp.c (//1) and it
> went from 7.2s to 8.4s -- 17% (emacs -Q, no line numbers).

The 17% is about twice what I'd expect, since adding 3 characters to
each line of xdisp.c enlarges its text by only 9.3%.

> The timing differences are primarily in display_line. gui_write_glyphs
> is 15% slower, which is nowhere near 576ms. Profile attached.
> 
> That certainly doesn't match the 78% slower for drawing glyphs in the
> line number scenario.
> 
> Any suggestions on what to try next?

The numbers are so against my intuition that I'm not even sure in
which direction to think...

How did you compile Emacs? which compiler and what compiler and linker
switches?  And what kind of CPU do you have there?  I'm looking for
something that could explain why parts of code that should take like
20% of the total redisplay time are so dominant in your case.

Alan, do you see similar numbers (in percents) to what Aaron reports?
Or is that something peculiar to his system?



reply via email to

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