all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Pittman <slippycheeze@google.com>
To: emacs-devel <emacs-devel@gnu.org>, Alan Third <alan@idiocy.org>
Subject: Emacs NS 'scratch/ns/draw-to-bitmap' branch performance
Date: Wed, 5 Feb 2020 11:00:05 -0500	[thread overview]
Message-ID: <CAC45yQsOMeRsSD+pK-MpPQCzvNfbuHDwdeSwNnGZKSxAZNtxDg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]

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?

https://developer.apple.com/documentation/appkit/nsview/1483425-candrawconcurrently?language=objc

[-- Attachment #2: Type: text/html, Size: 1927 bytes --]

             reply	other threads:[~2020-02-05 16:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 16:00 Daniel Pittman [this message]
2020-02-05 23:10 ` Emacs NS 'scratch/ns/draw-to-bitmap' branch performance Alan Third
2020-02-06 15:01   ` Daniel Pittman
2020-02-24  0:50   ` Daniel Pittman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAC45yQsOMeRsSD+pK-MpPQCzvNfbuHDwdeSwNnGZKSxAZNtxDg@mail.gmail.com \
    --to=slippycheeze@google.com \
    --cc=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.