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 19:25:31 +0100 Message-ID: References: <83o7hd4n5n.fsf@gnu.org> <83zg0x2gaf.fsf@gnu.org> <83pm1t2e7x.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="12351"; 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 20:27:04 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 1qoT3w-0002zw-1T for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Oct 2023 20:27:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoT3e-0001OO-GJ; Thu, 05 Oct 2023 14:26:46 -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 1qoT3c-0001Nx-De for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2023 14:26:44 -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 1qoT3c-0000Nw-5Y for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2023 14:26:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoT3u-0000IL-Ce for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2023 14:27:02 -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 18:27:02 +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.16965303651045 (code B ref 65908); Thu, 05 Oct 2023 18:27:02 +0000 Original-Received: (at 65908) by debbugs.gnu.org; 5 Oct 2023 18:26:05 +0000 Original-Received: from localhost ([127.0.0.1]:48512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoT2z-0000Gn-08 for submit@debbugs.gnu.org; Thu, 05 Oct 2023 14:26:05 -0400 Original-Received: from dane.soverin.net ([2a10:de80:1:4092:b9e9:2295:0:1]:58685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoT2t-0000GB-6Z for 65908@debbugs.gnu.org; Thu, 05 Oct 2023 14:26:03 -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 4S1g3K0D37z10NY; Thu, 5 Oct 2023 18:25:33 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.100]) by soverin.net (Postfix) with ESMTPSA id 4S1g3J2t1VzFp; Thu, 5 Oct 2023 18:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1696530332; bh=fViUpQxkbUgI89ORtxvs2gxDEcweRLsFNJk2Ki4z+XQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IcXz7a4q9dd0oANzLR8UQzlZ/32E02Vz4x9G2avDlOC+C3hjZkPQnSpZ1S3X9xW+x 3Tndj4WoRatPTxB1TZaH8/g95DoQhtzOACE0qhLvfy7gsp9CmegmwDy982BkpyWQwA o6/Cg8I2GtNoZbr0T2R5PJLbbvZTyFkIPrG1rJ2X25djvVktV83TyXBTuchGAtnNZ3 imdt6bzgwEN0rKoqPuZ48u48fMufelurBy51Dy8bl8VXrMbkx+rOCa6sR61vw+vZYz 9GaeDNvTljoBh/c4v4JdeXQY0UJWzxkS+oNTUCYF9DTyCA5wWMQbyoxKnBd6Iz/K+2 znaq2MgzGI9IA== 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:271911 Archived-At: On Thu, Oct 05, 2023 at 07:15:49PM +0200, Gerd Möllmann wrote: > Eli Zaretskii writes: > > >> > Are you sure you haven't profiled the same build? The profiles look > >> > almost identical. > >> > >> Yes, I'm sure. > > > > Then I guess the problem is not with the Emacs Lisp code, but either > > with the primitives implemented in C or some programs (Git?) invoked > > by this recipe. > > I find Alans's idea pretty compelling. Alas, I don't know enough about > git's internals to tell what it does when locales aren't set up > right. But it's very plausible, given the profiler output. OK, with Gerd's latest patch installed, I set my shell thus: export LANG="en_GB.UTF-8" export LC_COLLATE= export LC_CTYPE= export LC_MESSAGES= export LC_MONETARY= export LC_NUMERIC= export LC_TIME= export LC_ALL= and run: LANG=en_DE.UTF-8 src/emacs -Q which prints: LANG=en_DE.UTF-8 cannot be used, using en_US.UTF-8 instead. and sure enough "C-u M-! locale" gives: LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL="en_US.UTF-8" I then run the test script against the lisp directory in the emacs git repo: --- files: 61, delta: 4.428015 Elapsed time: 4.432377s (0.161921s in 13 GCs) "--- files: 61, delta: 4.428015" --- files: 61, delta: 4.416348 Elapsed time: 4.421116s (0.150580s in 12 GCs) "--- files: 61, delta: 4.416348" --- files: 61, delta: 4.391077 Elapsed time: 4.395202s (0.150900s in 12 GCs) "--- files: 61, delta: 4.391077" Then against the same directory copied elsewhere: --- files: 61, delta: 0.882561 Elapsed time: 0.887944s (0.138922s in 11 GCs) "--- files: 61, delta: 0.882561" --- files: 61, delta: 0.882582 Elapsed time: 0.887593s (0.139193s in 11 GCs) "--- files: 61, delta: 0.882582" --- files: 61, delta: 0.866825 Elapsed time: 0.871124s (0.122224s in 10 GCs) "--- files: 61, delta: 0.866825" Then I run: LANG= src/emacs -Q and run the test against the lisp directory in the repo: --- files: 61, delta: 5.87121 Elapsed time: 5.875535s (0.160997s in 13 GCs) "--- files: 61, delta: 5.87121" --- files: 61, delta: 5.867494 Elapsed time: 5.871656s (0.150614s in 12 GCs) "--- files: 61, delta: 5.867494" --- files: 61, delta: 5.83144 Elapsed time: 5.862261s (0.163723s in 13 GCs) "--- files: 61, delta: 5.83144" and the lisp directory not in the lisp repo: --- files: 61, delta: 0.869081 Elapsed time: 0.873759s (0.134711s in 11 GCs) "--- files: 61, delta: 0.869081" --- files: 61, delta: 0.873445 Elapsed time: 0.878768s (0.133343s in 11 GCs) "--- files: 61, delta: 0.873445" --- files: 61, delta: 0.870359 Elapsed time: 0.875465s (0.132767s in 11 GCs) "--- files: 61, delta: 0.870359" So the time with no git repo are near identical, but the times with a git repo vary by over a second. When I do "LANG=" it's trying to set the local to the empty string because we only check if LANG is null, which it's not, it's the empty string (I think) and that's resulting in a locale like (C-u M-! locale): LANG= LC_COLLATE="C" LC_CTYPE="C" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL="C" I don't think this is conclusive proof, but I think that either git or VC have a problem with a slightly broken locale. I'm not saying there's a bug here, it could simply be that we call git many times and it's having to work out the locale each time from the dodgy input I've given it. (I tried en_GB without the UTF-8 coding and the times were pretty much identical to the en_US.UTF-8 times.) -- Alan Third