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 15:37:11 -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="16105"; 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 Mon May 24 00:38:27 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 1lkwjq-0003zU-LE for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 00:38:26 +0200 Original-Received: from localhost ([::1]:42564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkwjp-0006et-O4 for ged-emacs-devel@m.gmane-mx.org; Sun, 23 May 2021 18:38:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkwis-0005fa-Gq for emacs-devel@gnu.org; Sun, 23 May 2021 18:37:26 -0400 Original-Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:35374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkwiq-0005mG-M7 for emacs-devel@gnu.org; Sun, 23 May 2021 18:37:26 -0400 Original-Received: by mail-pj1-x1030.google.com with SMTP id lx17-20020a17090b4b11b029015f3b32b8dbso8395453pjb.0 for ; Sun, 23 May 2021 15:37:24 -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=7IL+83zlI6BqNyG67mPYTZn4qoBjODUZtGH0DD/gQw0=; b=oirDVtP9B2cwAu1IpT/Q5VwoZtRyaDC1eK8JlMm8dRoCSwqgYhtC9lGAO4otwP2FHl NVS/c9VIoD4etYfSIa7JcJDUnHCzQjiqdfVodi5piW/w2Sf9sI+kcOFe5tNqjRsRu98g TOeYFC5DqylVUjbCTKndriV4fFQqfjdTnpgoPQbw/YBOKHsu2btVePQmFmmIran1PgcZ NiRuSX0QvEsZqxHasvADuC8RaovSwOg3hJss6ZSVMuMSyT33MkwlVIShrVF5BYxoTUtk /pCvSpbL4vE70o/WBnSAFRoiPTljtHO6pGSwZDrR29oUe6AS9ge10T2LKxy0m2/7ZCY4 KnDw== 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=7IL+83zlI6BqNyG67mPYTZn4qoBjODUZtGH0DD/gQw0=; b=Rp5uGNiw4SRGy118ZYvQya2MHdlya6HVlMd/4jxj8oDrFtXjolIMWhD6H3vDkPCfI7 Ypw1xQiOEF9N+u1ONI8kS17Ircyi2kD5OMVn3EV8iVsMxebcIhZ5AfyOxOi8CV95h4aL Ej+YA7gaxXSpGWWLeP6i+jaX1s0l3xfZplekRGweUmBiI47rVIs7gkBS8DlLQwRpSTQM giOhqEu85U31EW3/VdMSWLKflf2Gpjv7eU7gxjgpKYoetBNH4EwB8NDKcpicmM8Nj1fv v5WxpefefevGV/VdC0Pg7XbkzU2ldZgBY+KQvfYaycixT/qGOk06kdqw9jFjiRtDpdXi nTxg== X-Gm-Message-State: AOAM530wwaNIqCLmjrpt7iIfPsXsrB6BHd/9EZh5+5GTO4fBBg+8QEl5 Kan8sT+1dW9BZbF7PifgJztc6FwzP1B0aDJVmAo= X-Google-Smtp-Source: ABdhPJwCRmFSvKPjccGv9/46QrcmaM4zg5UGsnkX383dD05TPpfUO8wCyzd7yBQGmB2JZNLmMwfwCmpF2hMOU8aHpmc= X-Received: by 2002:a17:90a:e50b:: with SMTP id t11mr21826911pjy.181.1621809442946; Sun, 23 May 2021 15:37:22 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=aaronjensen@gmail.com; helo=mail-pj1-x1030.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:269711 Archived-At: On Sun, May 23, 2021 at 2:08 PM Alan Third wrote: > > > Interesting. And generally speaking, are there licensing issues > > preventing a merge/collaboration w/ the mac port? > > We already use the Mac port font backend (although I suspect they may > have diverged a little over time). Other than that I don't know how > much "collaboration" would be practical, and anything else would be simply > throwing the NS port out altogether and replacing it with the Mac > port, although then it would be subject to the same rules as the NS > port which may or may not be to Yamamoto Mitsuharu's taste. I see, is that the rules about how nothing can be done in a Non-free OS port that a free OS cannot do? > I don't really care one way or the other, I'm already using my new > ThinkPad as my daily driver and it would be quite nice to see the back > of the people on Reddit telling me I'm actively harming the Free > Software movement by maintaining the NS port instead of letting it die > so everyone is forced to use the Mac port. Wow, people are jerks. I'm sorry you have to put up with that. For what it's worth, I appreciate your work. I've never found the mac port to work for me (though they just fixed the long-standing gui/tty server issue which was a big one for me). This is the first time I've used the mac port and thought ok, this may work, but then because it's not on 28 yet, I miss native comp. I just can't have it all. > > > 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. > > My configuration seems to not even work with Emacs 27 any more, so I > can't properly use it myself. Copy that. I'll keep using it. > On Sun, May 23, 2021 at 10:06:35AM -0700, Aaron Jensen wrote: > > Told you I'd back-port that fix. ;) Hah, I wasn't going to say anything... > I've seen similar, but only when I start the benchmark then click on > another window. My thinking was that macOS was seeing I'm no longer > using it and put it into some low-performance mode. But clicking back > in the window doesn't fix it. I've no idea what's going on and I've > only seen it happen when using the benchmark so I've not investigated. Yeah, I wouldn't worry about it. I restarted and it was normal. 2.98s for line numbers, 1.57s w/o. So still quite a bit faster than 28 surface stuff. I also just tested macport with a stopwatch and it's very close to 28. 4.5s w/ line numbers. > I've made surface-stuff as much like the (non-metal) mac port as I > possibly can. I'm not seeing any difference. I've put an NSLog at the > start of keyDown and another at the end of updateLayer, and the time > difference is pretty consistently about 3ms, so I don't think the NS > port's IO is slow. That leaves the time between the key being hit and > the NS port registering it, which I don't think we can do anything > about, or the time between us passing the IOSurface to the system and > it actually displaying, which should be identical to the Mac port, > unless it's using some sneaky setting I've yet to discover. > > If it's still laggy, I've got absolutely no idea. Interesting. Well I know that my config is adding some latency. Likely company, flyspell, flycheck, etc. I'll keep digging on my end too. Thanks, Aaron