G'day Alan, et al.
After building Emacs with the ns/draw-to-bitmap branch merged, on macOS 10.15.2, I'm seeing some performance issues. I'd like, Alan, to know how you would prefer me to proceed in a way that best helps you (and anyone else here) resolve them.
This is on a MacBook Pro (15-inch, 2019), Intel UHD Graphics 630 1536 MB + Radeon Pro 555X machine, driving the 2880 x 1800 internal LCD at the default 1680 x 1050 apparent resolution. `frame-edges` are at 78, 45 and 1677, 1049, as far as Emacs is concerned.
The trivial reproduction, for me, is to hold any key (eg: "n") to get auto-repeat inserting it. On this machine I see approximately 50 characters every 10 seconds, or ~ 5 "frames" per second. This is, of course, substantially lower than anywhere else in the OS, and also far below what I'd experience prior to that merge.
This is a pretty clear "graphics update" cost:
(list (progn (goto-char 0) (benchmark-run 40 (next-line))) (progn (goto-char 0) (benchmark-run 40 (next-line) (redisplay))))
=> ((0.006762000000000001 0 0.0) (9.116147 0 0.0))
I can dig into this myself, and see if I can't figure out what is slowing everything down, but I figured I'd ask first.
PS: I didn't check yet, but one of my first points of call is going to be the "canDrawConcurrently" flag on the NSView, since the bitmap rep means it doesn't need to block anything while redrawing, yes?