all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: ccsmile2008@outlook.com, Eli Zaretskii <eliz@gnu.org>,
	65908@debbugs.gnu.org, gregory@heytings.org,
	stefankangas@gmail.com
Subject: bug#65908: 29.1.50; Emacs 29 regresses on macOS
Date: Thu, 5 Oct 2023 19:25:31 +0100	[thread overview]
Message-ID: <ZR7_mwxKPPx0Dhlj@breton.holly.idiocy.org> (raw)
In-Reply-To: <m234ypxa62.fsf@Pro.fritz.box>

On Thu, Oct 05, 2023 at 07:15:49PM +0200, Gerd Möllmann wrote:
> Eli Zaretskii <eliz@gnu.org> 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





  reply	other threads:[~2023-10-05 18:25 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13  6:47 bug#65908: 29.1.50; Emacs 29 regresses on macOS Zhang Haijun
2023-10-04  5:44 ` Gerd Möllmann
2023-10-04  7:38   ` Eli Zaretskii
2023-10-04  7:50     ` Gerd Möllmann
2023-10-04  8:29       ` Stefan Kangas
2023-10-04  8:32         ` Gerd Möllmann
2023-10-04  9:02         ` Gregory Heytings
2023-10-04  9:12           ` Gerd Möllmann
2023-10-04  9:12           ` Stefan Kangas
2023-10-04 10:55             ` Gerd Möllmann
2023-10-04 12:43               ` Gerd Möllmann
2023-10-04 21:16                 ` Alan Third
2023-10-05  5:41                   ` Eli Zaretskii
2023-10-05  5:55                   ` Gerd Möllmann
2023-10-05  6:08                     ` Eli Zaretskii
2023-10-05  8:52                       ` Gerd Möllmann
2023-10-05  9:48                         ` Alan Third
2023-10-05 11:12                           ` Gerd Möllmann
2023-10-05 13:18                             ` Gerd Möllmann
2023-10-05 16:11                               ` Eli Zaretskii
2023-10-05 16:33                                 ` Alan Third
2023-10-05 16:38                                   ` Gerd Möllmann
2023-10-05 17:02                                   ` Eli Zaretskii
2023-10-05 17:15                                     ` Alan Third
2023-10-05 13:51                             ` Alan Third
2023-10-05 14:01                               ` Gerd Möllmann
2023-10-05 14:09                               ` Gerd Möllmann
2023-10-05 14:58                                 ` Alan Third
2023-10-05 15:11                                   ` Gerd Möllmann
2023-10-05 16:29                                     ` Eli Zaretskii
2023-10-05 16:39                                       ` Gerd Möllmann
2023-10-05 17:06                                         ` Eli Zaretskii
2023-10-05 18:08                                           ` Stefan Kangas
2023-10-05 13:56                             ` Gerd Möllmann
2023-10-05 16:19                               ` Eli Zaretskii
2023-10-05 16:26                                 ` Alan Third
2023-10-05 16:43                                   ` Gerd Möllmann
2023-10-05 16:36                                 ` Gerd Möllmann
2023-10-05 17:04                                   ` Eli Zaretskii
2023-10-05 17:15                                     ` Gerd Möllmann
2023-10-05 18:25                                       ` Alan Third [this message]
2023-10-05 18:33                                         ` Gerd Möllmann
2023-10-05 18:46                                           ` Gerd Möllmann
2023-10-05  8:58             ` Gregory Heytings
2023-10-05  9:03               ` Gregory Heytings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZR7_mwxKPPx0Dhlj@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=65908@debbugs.gnu.org \
    --cc=ccsmile2008@outlook.com \
    --cc=eliz@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=gregory@heytings.org \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.