From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.devel Subject: Re: macOS metal rendering engine in mac port Date: Sat, 22 May 2021 11:59:43 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21106"; mail-complaints-to="usenet@ciao.gmane.io" To: Alan Third , Aaron Jensen , emacs-devel@gnu.org, YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 22 21:01:11 2021 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 1lkWs2-0005MR-LY for ged-emacs-devel@m.gmane-mx.org; Sat, 22 May 2021 21:01:10 +0200 Original-Received: from localhost ([::1]:52790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkWs1-0004ZU-Nz for ged-emacs-devel@m.gmane-mx.org; Sat, 22 May 2021 15:01:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkWqs-0003jW-11 for emacs-devel@gnu.org; Sat, 22 May 2021 14:59:58 -0400 Original-Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:38902) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkWqq-00027v-6i for emacs-devel@gnu.org; Sat, 22 May 2021 14:59:57 -0400 Original-Received: by mail-pg1-x52a.google.com with SMTP id 6so16935461pgk.5 for ; Sat, 22 May 2021 11:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=C6VSjKE+w83EiQci84Hf3qYnlHLNXLZBS8cM9t7gjCw=; b=uZpRZNnHsskyQtsGda2r9glkRu1a189ZxuQQ1LeKpWl0wDTR+V3aNEXpcHsvaVhGOd MO54sszn0kwHYmQ2VdMo3tDEVyYy8k0QAoZPEHKVmFGXfV2oJDrHGGyP8PtfZIHIXksZ thpGJcsjdUzMUm4kytk+KX4OOhaH46/CiWYv04CgwGfdnhcL2xa/6vr6ceQgvIpunylM tHDADbWZQvUNjlA/P3a9X9cDy8UIT9FPh23krHjl34VV+xYhBrEjpNnOw0w2YvFCgHfi vpnN53PqtihE0S5HbTonhcVZGdC9qAbgBa2B0ObbQg0KXZb5ZLd+KcydHXvSsmS4XEct Fv2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=C6VSjKE+w83EiQci84Hf3qYnlHLNXLZBS8cM9t7gjCw=; b=dukDVk1AETULVEXwmcLsWryyaDY7Lw+AufwO3CU1oaFCSu4JRRVgo+IDsI3NbOYQLw nFJz4rpm1tHSR5Mn5BkxpoNQh/7cAML3ZAMc7O5OxFFxGhxrQzOHL9Eqf7wBDs6morUf CjzDU20rfg+BNzHwvb0LStCK3kcVDCe6O5fdvPL3dfC6PQ8i3VHuihZxC//0wdZW3omo ESz427L9MZjbvzsGdnBMdYTl/UudmHiammwovyV9UtpN3645jAAc/l6CCELacrn5M4I1 Q3wCK7dMBAc1P0B2uEvbR/1DectGcI55xYzpipuocJtsHExud/A7/rI8mGZMn7sjjNmj 6Upg== X-Gm-Message-State: AOAM530x1pqeRYf1rLZNaRNHLlhSlas0T5qkgb2yB5u9nacK4iFrg+60 mANyfBoldkmS3/Vwhl1GqhgBBI3bgm7vf+hllTM= X-Google-Smtp-Source: ABdhPJwC0uL1LzfMViaP6BNsJIcwIf61v93/jAcuukEOAZy7/RAZIpUGjP5/r4gDQxAC8HLH305bpqIBu1gteNFrMMU= X-Received: by 2002:a05:6a00:cd4:b029:2e1:b937:77e8 with SMTP id b20-20020a056a000cd4b02902e1b93777e8mr15433730pfv.43.1621709994352; Sat, 22 May 2021 11:59:54 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=aaronjensen@gmail.com; helo=mail-pg1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:269622 Archived-At: On Sat, May 22, 2021 at 11:45 AM Alan Third wrote: > > On my machine the scroll benchmark shows Emacs 27 being able to update > the screen more than twice as fast as any version of the Mac port, yet > this shows Emacs 27 isn't really any better. For some reason, Emacs Mac port (non-metal) doesn't paint the screen during scroll-up-benchmark, it just pauses, but it's faster on my machine. Full screen frame, with line numbers (11k lines): Mac port: 2.88s emacs27-drawing branch: 4.42s master: 6.75s Full screen frame, no line numbers (11k lines): Mac port 2.24s emacs27-drawing branch: 3.13s master: 5.3s > > Perhaps they both reach the maximum input rate? > > Or the NS port's event handling is slow, which is quite possible as > it's single threaded and I think the Mac port uses a separate thread > for toolkit stuff. (Someone please correct me if I'm wrong.) Ah that might explain why things feel a little faster, especially w/ company-mode. > IIRC you said that you still thought input in Emacs 27 feels sluggish? > > > I've attached a couple profiles of the surface stuff branch. > > It turns out I can't open these because my version of xcode is too > old... Although I think it's the most recent I can use on this > machine. Doh. I'll send screenshots next time. > > Of note is that display-line-number-mode seems to be a massive > > culprit in slowing this down. Turning that off about gives me about > > 50% more performance. > > Does it give a similar slowdown in the Mac port? Not quite as significant. And on the scrolling benchmark, it's not 50%, but it is 25-40% > > The rest of what takes time appears to be mem copies, which makes > > sense that that would scale w/ screen size. > > If someone wanted to send me a 5k screen, debugging this would be a > lot easier. ;) I may be selling mine in time... Is it possible to set your resolution to higher than your monitor supports and scale it down? Also, maybe decreasing your font size may change things as there'd be more lines. Aaron