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: Sun, 23 May 2021 09:13:51 -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="11756"; 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 Sun May 23 18:15:09 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 1lkqku-0002nC-Tz for ged-emacs-devel@m.gmane-mx.org; Sun, 23 May 2021 18:15:08 +0200 Original-Received: from localhost ([::1]:56034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkqkt-0002fp-Mz for ged-emacs-devel@m.gmane-mx.org; Sun, 23 May 2021 12:15:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkqju-0001z8-DI for emacs-devel@gnu.org; Sun, 23 May 2021 12:14:06 -0400 Original-Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:38578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkqjs-0002b2-Rf for emacs-devel@gnu.org; Sun, 23 May 2021 12:14:06 -0400 Original-Received: by mail-pg1-x536.google.com with SMTP id 6so18261037pgk.5 for ; Sun, 23 May 2021 09:14:03 -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=p3IFdC7sh6kwBIzZLv0IcFRK2+dUl7YC1WItHOLF7ug=; b=b5pCysPSXCfh9lGDSVVTHR7z4xHwq0NMQm7b3KlTfjlq+1OOtaM77mZox9akXI8T/1 tUKCbrrVBXhQd1hBd+rNw0Fhb8lDLTlSd3l02GcgdlZTAgTk2GU4pvzwg+rXdB7015j3 9trBD0HkQV/N/wpc2l9Vm0g7gokUu+J4agKfjlauKpuCwl87h2WNmfVYzJf4qfMcgptw YN34BjweIbFObz/ya0LW0Gs3BFbjqjih936Zr5JEUMtLSD9ZyNuIZAb2yFev0viYNHL6 +Wdd2ywPOOk6LMQeVBL7ORCGctL+qPkZJwdCrK5YhZIfvv4mxciPxaTeGiZ7USqfPM/S +czA== 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=p3IFdC7sh6kwBIzZLv0IcFRK2+dUl7YC1WItHOLF7ug=; b=Z58ea+lQf+D0Kut0AxNGUXZp7w7zX4OID858A56ZR+lWuaKRxrnUAGTkiACMIavfKe XMck1RDt2OAr88TvPc297Fy2pR3LeBe518J9R53j2EPDnPrM2kz1uRM6/b4EkfOIuOY+ Ph0GrMAVTRfeDCNhdGvqNPF4/0L2avtyjhf3sZg8l65uRqfC+lJtQF3GtUphMeG/1QcM cGCoH1IGWVpmZu9+zefB3CZqbMus4o//QsmUEIyC+MeC4acc52qwqWsHAnnoX9XvVb9N C0FYmxgmJsdcmsqrjmM30YzHl0O4qP3rWU5nzeBHaOsjxKo36X6ybVA8zN/8kbLNcllQ 0Qew== X-Gm-Message-State: AOAM533Wj8Hnf55JkAwsFyUtfCR5lj+nKK1ot63YVprJhC/iQmpHO2DB rBYGngeutM1KMxcXeZy9lq4Nv5VETiiIlIydoa0= X-Google-Smtp-Source: ABdhPJxaxNE8D5We4+Z2JLPCB+enEjTGDno0c4tIpvzOSkVeylzncOaRCLS8gA7jFZ0k0h+rEgO8Vk6TJCMbCD/dGWM= X-Received: by 2002:a05:6a00:cd4:b029:2e1:b937:77e8 with SMTP id b20-20020a056a000cd4b02902e1b93777e8mr19252464pfv.43.1621786442871; Sun, 23 May 2021 09:14:02 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=aaronjensen@gmail.com; helo=mail-pg1-x536.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:269678 Archived-At: On Sun, May 23, 2021 at 4:47 AM Alan Third wrote: > > > > Mine are fairly consistent. I imagine hitting thermal would hurt > > though and Intel macs love to do that. > > Yeah, I wonder if that's what's happening. I have to say that I don't > think this Mac has ever been what I'd consider fast. My ancient first > gen i7 absolutely wipes the floor with it in compilation speed > despite being at least 7 years older. I guess Moores law really did > run out of steam. ;) I'm curious what chip you have? I have a 2.4 GHz I9-9980HK and it's not slow to compile, but the linux machine I was using for a while demolished it. Of course, that was a 16 core 3950X, so... > > What isn't consistent is typing experience. There are times when it's > > just like molasses but I can't necessarily reproduce that with > > benchmarks. I wonder if the separate threaded IO from the mac port > > helps make things feel more consistent in some way. > > Probably, the threading also seems to be used to do the buffer copies > and things. AFAICT it also offloads the copy to Metal when it's > enabled, although I imagine that then involves copying the buffer back > down to system RAM from VRAM for updating, so I don't know how much of > a win it really is. On a fast graphics card it maybe really is a big > win. Interesting. And generally speaking, are there licensing issues preventing a merge/collaboration w/ the mac port? > It's a lot of work. I'd have to be sure that the patch actually stops > the flashing and blanking before I tried that. I'm not hopeful, tbh. I've been using it and haven't seen any flickers. I'll continue using it and report back. I probably would have seen one by now. > Anyway, the last thing I want to try to improve lag is to move the > buffer copy to as soon after the layer update as possible, so that > when you hit a key we don't have to wait for it before we can start > drawing. I've pushed a change to the surface-stuff branch, so can you > please give it a go and see if there's any improvement. Will do.