From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#65908: 29.1.50; Emacs 29 regresses on macOS Date: Thu, 5 Oct 2023 14:51:58 +0100 Message-ID: References: <8875281f07b4d23d857c@heytings.org> <83o7hd4n5n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32678"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ccsmile2008@outlook.com, Eli Zaretskii , 65908@debbugs.gnu.org, gregory@heytings.org, stefankangas@gmail.com To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 05 15:53:12 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qoOmt-0008HU-Vl for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Oct 2023 15:53:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoOmf-0006w7-1s; Thu, 05 Oct 2023 09:52:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoOma-0006vd-Km for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2023 09:52:52 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qoOmR-0000ik-VA for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2023 09:52:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoOmj-0006y3-VA for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2023 09:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Oct 2023 13:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65908 X-GNU-PR-Package: emacs Original-Received: via spool by 65908-submit@debbugs.gnu.org id=B65908.169651395026742 (code B ref 65908); Thu, 05 Oct 2023 13:53:01 +0000 Original-Received: (at 65908) by debbugs.gnu.org; 5 Oct 2023 13:52:30 +0000 Original-Received: from localhost ([127.0.0.1]:46311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoOmE-0006xG-20 for submit@debbugs.gnu.org; Thu, 05 Oct 2023 09:52:30 -0400 Original-Received: from dane.soverin.net ([2a10:de80:1:4092:b9e9:2296:0:1]:40901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoOm9-0006wy-UV for 65908@debbugs.gnu.org; Thu, 05 Oct 2023 09:52:28 -0400 Original-Received: from smtp.soverin.net (c04smtp-lb01.int.sover.in [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dane.soverin.net (Postfix) with ESMTPS id 4S1Xzg460Kz5C; Thu, 5 Oct 2023 13:51:59 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.99]) by soverin.net (Postfix) with ESMTPSA id 4S1Xzg0WFjzM6; Thu, 5 Oct 2023 13:51:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1696513919; bh=iDCK0K/Qrjfk3m+SRpRdOf6qegNY2CqQVhF87jypuVE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nn9VsKd4VhO+YzcRoyQyFaJnrZrNn0kbJMsbKki993DSYP4dO6hX4Lu56p8Ezf/5p B5yYODSA34soLgRKY58ROKGF+8NG9s+nzYiorL6sGU7OfwleoMxhkHHWR8OSN1t+07 7LRESEOZbKLD2SSnl9nhKpkthwU/083tz/CXi8zTPtvPdF1mp+QiUVK1ou54webNDt EWhSMN0CVWZDMDqrWs7wEODRwJCW0w8f49vP+nETvSNjyZRidBKVz/RdxesWK8Dtfe AWIlwO2kkqutBU5cf4HrWnrM7cniXpULy+gxNx9+I3tTOIv/TGrsX1HoTBQJ4LGNeX hiIoSnOjNzWjA== X-Soverin-Authenticated: true Mail-Followup-To: Alan Third , Gerd =?UTF-8?Q?M=C3=B6llmann?= , Eli Zaretskii , gregory@heytings.org, 65908@debbugs.gnu.org, stefankangas@gmail.com, ccsmile2008@outlook.com Content-Disposition: inline In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271873 Archived-At: On Thu, Oct 05, 2023 at 01:12:10PM +0200, Gerd Möllmann wrote: > Alan Third writes: > > > On Thu, Oct 05, 2023 at 10:52:21AM +0200, Gerd Möllmann wrote: > >> Conclusion so far, for me, > >> > >> - don't selocale in ns_init_locale, only setenv LANG, or set LC_CTYPE, > >> maybe. > > > > setlocale in ns_init_locale is only there to check if the locale is > > valid, it resets it back to its initial value at the end. > > That's okay. What I meant was setting the old locale at the end. I've managed to reproduce this, and the time difference on my machine is ridiculous. From 4 seconds without the setlocale calls to 24 seconds with. And that's with a legitimate, installed, locale ID in both cases. I wonder if this is why some people report Emacs 29 on macOS to be noticeably slower. They, of course, blame the graphics changes, but with that sort of variation in time... > > Out of interest, when is it slow? Is it when we have an invalid locale > > ID? > > That's an interesting question--whatever I do on master, it's almost > equally slow :-). > > It would be nice if I could get at least the right character encoding on > my system... On the plus side, I at least know now what's happening, > although I don't know what to do. Indeed. I'm tempted to say we should revert the change since I now suspect I misunderstood how setlocale works when I wrote this and I'm not sure it's actually improving anything. OTOH, it would be good if we could get this to actually work and generate correct locale ID's for the system... But then, I don't know what *is* a correct locale ID for a system like yours... > Aprt from that, I'm currently trying to get profiling working on my old > Macbook Pro, to compare the profiles of the 2 commits on emacs-29 which > show the difference. That could maybe answer your question. > > Buhut... I can't currently get Instruments to work, which might be > related to the fact that I've updated my unsupported by Apple Macbook to > Sonoma with OCLP. Buhut -- maybe the new thunderbolt/magsafe cable for > my display arrives soon, so that I can use my Mac mini again. A lot of > construction sites ahead :-). I couldn't even get the old commit to build, I had to use the current master and just revert to see the difference. So best of luck! :) -- Alan Third