From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.devel Subject: Emacs NS 'scratch/ns/draw-to-bitmap' branch performance Date: Wed, 5 Feb 2020 11:00:05 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001f29c1059dd64216" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="69320"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel , Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 05 17:01:45 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1izN7Z-000HvE-0a for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Feb 2020 17:01:45 +0100 Original-Received: from localhost ([::1]:51534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izN7Y-0004U3-1i for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Feb 2020 11:01:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45126) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izN6f-0003o8-Eb for emacs-devel@gnu.org; Wed, 05 Feb 2020 11:00:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izN6e-0000sj-2q for emacs-devel@gnu.org; Wed, 05 Feb 2020 11:00:49 -0500 Original-Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]:41284) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izN6d-0000m2-QJ for emacs-devel@gnu.org; Wed, 05 Feb 2020 11:00:47 -0500 Original-Received: by mail-qk1-x72f.google.com with SMTP id x82so2290559qkb.8 for ; Wed, 05 Feb 2020 08:00:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=wvMstQohtBCqF5gENm8pfrd/Ddhc34O69wRD8P5IVxI=; b=nzAaQLz3wxt8JWgFFzY5ysAumoDlFRmGdXsbfkMVy+Usv/KTXmVP8+4Gpc3cisO5G1 V+CIeD5Ikz18op18esc4Aa1Yr36SzvxkIp1IiENkwCrdl+TmjiqvTBjQ/dG0WhZ5ReMv dpAQbQnOb7ZwZtiSrjpKB656+mVG/+BJ05x1mbi9z4M4dtVTyPyVH0zfh2rFMpo47K/d QB+ugsuOP+535evrqC96oF3dxIPCFYkbElfy6wQ75cKdUEWxyp4ruaAxetd6O6qV0IjY E2swYKKcwVseupPSU9LfphzrGptV6at94JHf1/0ewI6QiiGuNGPElq7wFJvUYTTThPEP RFJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=wvMstQohtBCqF5gENm8pfrd/Ddhc34O69wRD8P5IVxI=; b=K2uH2YVGcJTj1HRLSXvX3UyIDOOqHwX4Jg7mrkVz2EepCFMvRNFawcFk3Xj8+F8kLh xLM066GWm9Gxi+MCXiIKe6d5ylggOR224XUT0mBQ6/Ykj2pmSpt/spHt6MdV4lNykeLM TmGiRehU8k3WhD/Mcop0FZHYZxfoDJ73IiYBlFJeoSaUexGCP64UkZsFRJWvFi9ginM/ O39kf53XxQ3mhO0cNeNP00sdeieala9Jws8wYgMNfS68vOAH+Jk1m6VfGGNxSjwMlaAC gaPDdmTL6QQpulJZymYikU2ANpjzGhA6usGFU3z+gUN51KJe8e+BLriCV1vYKGO7XvHt lCmQ== X-Gm-Message-State: APjAAAVho6UyNW2q17R0Eap0XIRTZRSlRDPAJ9hQZWhjiUv2SyMP9UzV qPH67Hw5qOLbsx2w91egJb6DlJWT385SRJut+br5cEbfq/E= X-Google-Smtp-Source: APXvYqwmS7ZHkCr7LKRnjnQCb1Pjmg67q6nj8dCbsiqBTyJTVYqcQy3sa0IppcdgPZz9poX+BPJxXhsNLN4lzmGdgCs= X-Received: by 2002:ae9:e115:: with SMTP id g21mr32897715qkm.187.1580918441419; Wed, 05 Feb 2020 08:00:41 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::72f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:244865 Archived-At: --0000000000001f29c1059dd64216 Content-Type: text/plain; charset="UTF-8" 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 --0000000000001f29c1059dd64216 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
G'day Alan, et al.

After building E= macs with the ns/draw-to-bitmap branch merged, on macOS 10.15.2, I'm se= eing some performance issues.=C2=A0 I'd like, Alan, to know how you wou= ld prefer me to proceed in a way that best helps you (and anyone else here)= resolve them.

This is on a=C2=A0MacBook Pro (15-i= nch, 2019),=C2=A0Intel UHD Graphics 630 1536 MB + Radeon Pro 555X machine, = driving the 2880 x 1800 internal LCD at the default 1680 x 1050 apparent re= solution.=C2=A0 `frame-edges` are at 78, 45 and 1677, 1049, as far as Emacs= is concerned.

The trivial reproduction, for me, i= s to hold any key (eg: "n") to get auto-repeat inserting it.=C2= =A0 On this machine I see approximately 50 characters every 10 seconds, or = ~ 5 "frames" per second.=C2=A0 This is, of course, substantially = lower than anywhere else in the OS, and also far below what I'd experie= nce prior to that merge.

This is a pretty clear &q= uot;graphics update" cost:
(list (progn (goto-char 0) (bench= mark-run 40 (next-line))) (progn (goto-char 0) (benchmark-run 40 (next-line= ) (redisplay))))
=3D> ((0.006762000000000001 0 0.0) (9.116= 147 0 0.0))

I can dig into this myself, and se= e 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 "canDrawConcurrentl= y" flag on the NSView, since the bitmap rep means it doesn't need = to block anything while redrawing, yes?


<= /div>
--0000000000001f29c1059dd64216--