Subject: Re: bug#66288: 29.1; Performance regression using pipe for subprocess

From: Eli Zaretskii <[email-masked]>
Date: Mon, 02 Oct 2023 08:02:14 +0300

> Date: Sun, 1 Oct 2023 14:02:26 -0400
> Cc: [email-masked]
> From: Chris Hanson <[email-masked]>
> 
> > Please post the comparison as you see it on your system, preferably in
> > quantitative terms (e.g., time it takes to read and process some chunk
> > of text in both versions), and using the same version of MIT/GNU
> > Scheme.
> > 
> > FWIW, I see no changes in xscheme.el between v28.1 and v29.1, except
> > some minor aesthetic changes and renames of functions.  So I wonder
> > how come you see a significant slowdown.
> 
> Attached find two screen grabs showing 28.2 and 29.1; you'll see the 
> difference is dramatic.  In both cases the same MIT/GNU Scheme version 
> was used.  (FYI: I'm the MIT/GNU Scheme maintainer, as well as the 
> original author of "xscheme.el".)

Thanks, but I cannot view these files here.  And viewing them might
change the timing anyway, which is why I prefer that you time this on
your system and provide the numbers with explanations how each number
was measured and what did Emacs do during that time.

> I saw that there were no relevant differences in "xscheme.el" but I 
> never thought that was relevant.
> 
> I believe this has something to do with how piped subprocesses are being 
> managed.  I've not looked deeply into the C code for this, but I could 
> find no mention of anything to do with pipes in NEWS.

Because AFAIK we didn't change anything in that department.

Showing a profile ("M-x profiler-start RET RET", run the slow recipe,
then "M-x profiler-report RET", then post the fully-expanded profile)
could also provide some useful ideas about the source of the issue.

Thanks.