GNU bug report logs - #66020
[PATCH] Reduce GC churn in read_process_output

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Dmitry Gutov <dmitry@HIDDEN>; Keywords: patch; Done: Dmitry Gutov <dmitry@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 11 Jun 2024 20:24:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 11 16:24:09 2024
Received: from localhost ([127.0.0.1]:36361 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sH82L-0002jC-5b
	for submit <at> debbugs.gnu.org; Tue, 11 Jun 2024 16:24:09 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47376)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sH82I-0002i3-PV
 for 66020 <at> debbugs.gnu.org; Tue, 11 Jun 2024 16:24:07 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sH1CS-0006kC-Lg; Tue, 11 Jun 2024 09:06:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=beimK0F80S4+zr/61uOowweQNzRSqpHqzHabCJAcI5Q=; b=NBDq+Q7EioQA
 VQbX/NwxG3LeRtSDg7htzZ/CnLFIV2qgidkV3GTmKTGCCqVRQK3gYT6/51OzPGQGVFUP2OPLKYke5
 PAODgpv8rOOFhp2Fj9P9jI49+FHQDdKuRIPe6zReByn2XYLloxbBzqj6Dqy52uZapFCbnVJW8f8bK
 BSjOkwqCOTrvY0Bz4gifXLRnvKfVDSFTROeORg72fbkZfFojkykAwwnrQHCdG06Vy2kfKBCN28JW4
 yLf9+yFh20ULlZ0AGqa9BWOYBlnWZZpvwHUxtjFmo/edU6teIbySjgyIaY0A3pwRnEUl0WBqZaJ8r
 vKerGmfbbGvL1XyCVX0N9g==;
Date: Tue, 11 Jun 2024 16:06:05 +0300
Message-Id: <86y17b6342.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwv8qzbmyjp.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Tue, 11 Jun 2024 08:55:53 -0400)
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN>
 <838r8w3zr2.fsf@HIDDEN>
 <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN>
 <868qzwwoif.fsf@HIDDEN>
 <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
 <86o78bd473.fsf@HIDDEN>
 <15f746d0-e635-47a0-a613-2ea31523966a@HIDDEN>
 <5922967c-1a6e-4b6e-b299-37fb598e5eca@HIDDEN>
 <86frtk6kfs.fsf@HIDDEN> <jwv8qzbmyjp.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: dmitry@HIDDEN, eggert@HIDDEN, stefankangas@HIDDEN,
 66020 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Dmitry Gutov <dmitry@HIDDEN>,  stefankangas@HIDDEN,
>   eggert@HIDDEN,  66020-done <at> debbugs.gnu.org
> Date: Tue, 11 Jun 2024 08:55:53 -0400
> 
> > Technically, this is okay, but I'd like to hear from Stefan about
> > whether it's correct to insert process output before the markers.
> 
> AFAIK, when the insertion is done by the default process filter, it's
> indeed done "before the markers".  I have no idea why it's done this
> way and would have preferred it to be different in many cases, but it's
> been that way forever and changing it would inevitably break some code.

OK, thanks.  I guess compatibility wins here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020-done <at> debbugs.gnu.org:


Received: (at 66020-done) by debbugs.gnu.org; 11 Jun 2024 20:00:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 11 16:00:43 2024
Received: from localhost ([127.0.0.1]:36267 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sH7fe-00022B-SO
	for submit <at> debbugs.gnu.org; Tue, 11 Jun 2024 16:00:43 -0400
Received: from wfhigh3-smtp.messagingengine.com ([64.147.123.154]:46277)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1sH7fd-00021y-HN
 for 66020-done <at> debbugs.gnu.org; Tue, 11 Jun 2024 16:00:41 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailfhigh.west.internal (Postfix) with ESMTP id D72C6180012B;
 Tue, 11 Jun 2024 16:00:34 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Tue, 11 Jun 2024 16:00:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm3; t=1718136034;
 x=1718222434; bh=/g2pDHRvcNcq6uSCnVCgj3oWr93FnpLfeCgJ6q0Gf0U=; b=
 cs2eDw01iR4lUyi+TW8Evp3gGHxbzV2W86BSuGqgrqPR2MZ7W5/SXBAu54Vyekln
 gqkcTXWCQHFaSzeNGNCUE2m4kEILETSs9JvZEHYHN4JVHrdAWAwknRJbzR9zG4mO
 J9e5lkO5MRiGEP/SxXHfdx/Sn5Ics0KcResT76ZoZ+fZOXLvkCgI4nhZn3YJlf88
 bT6OiP/JoIHObDLlD+QG1SPNBt4DZ+Om401s3Sq6aty8cj069uoNXg/7r+GIWLX1
 aHJIOViL3Z/dZfnvN0P3Q81YP4lsN4PuNPeFYgU3ilnSx0xOr3s+QD3UwxXWlwfv
 cg14+RjomvKmIA3stDciiA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718136034; x=
 1718222434; bh=/g2pDHRvcNcq6uSCnVCgj3oWr93FnpLfeCgJ6q0Gf0U=; b=V
 5t1THqJSdFOZrXZufOeqO8Z/Ogp/fH4c+nqS1L/08wKphddAHME6WD0qmDzHiYGq
 rIRlFs9WqwfMlLvidaYu+Pfx+Dl806V9bzkmyPG5hw5P1qCku/n50R+giwoAmFr2
 cyAMY2DtmTI3CGplsrvg2ce/HKK4+gD23NYam7P/FZObsUZsx49A3QiyOIQbGvdH
 6lfNZmUZQBJ6fVKScl1kNXMRR8W1hwevTf+zD0Ife0CSNfyKV8jgXZj/7WpUMXoR
 jt1XfFW1b9KGX0QFuz7gqkPQbKbeM4RasGJdN2MVr0mJBfQEY1jY5Alt729MRRx8
 QyqUICNq2ct7PLvVgN1kA==
X-ME-Sender: <xms:4qxoZl-2hgDUJik82GzC7pz7ZCmx-Q0WoKAI7opHQgC3iHQF4e2LeQ>
 <xme:4qxoZpscvwoXIi2uj9dQh6jhBUr-WL_qcoDekJ9P_SS2mWC_QJnKfAgU5k1dT0nll
 NbvWql7is6G9viQkBo>
X-ME-Received: <xmr:4qxoZjDIVgckGD3s2skQQyaTaFu2Bc4MSPUfuVF8XwyEDQ6zhCKyr_Ja_8DAM00cb4Le>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeduvddgudegvdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveeg
 udejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 gumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:4qxoZpfI8YikNAf1CktJUXGTSexZNLGPff76p2N7QU3dYoAUq3v0YA>
 <xmx:4qxoZqPWoaLRo0emt0k0mE6ampfOZ9i-QP6nkWhBadyJi_YN4SJHyg>
 <xmx:4qxoZrlx6V6gRUY3E3Y7JgXScu8TAKk7PXK2eqIGAZNaI3O-Iibavg>
 <xmx:4qxoZkszu9wJY2QXFX9tG3uZ9S8BVf2cuWp1nvaLg1e9vbf9whzf9w>
 <xmx:4qxoZmBxGh5Q0PfvbtXaQEnugVD85c72h4Bm4k2rBZA4r_lBl3mv8qPP>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 11 Jun 2024 16:00:32 -0400 (EDT)
Message-ID: <635a9a9b-8a71-4133-a923-2bec7b12cfbf@HIDDEN>
Date: Tue, 11 Jun 2024 23:00:30 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
To: Ihor Radchenko <yantar92@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN> <838r8w3zr2.fsf@HIDDEN>
 <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN> <868qzwwoif.fsf@HIDDEN>
 <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
 <86o78bd473.fsf@HIDDEN> <15f746d0-e635-47a0-a613-2ea31523966a@HIDDEN>
 <5922967c-1a6e-4b6e-b299-37fb598e5eca@HIDDEN> <86frtk6kfs.fsf@HIDDEN>
 <jwv8qzbmyjp.fsf-monnier+emacs@HIDDEN> <87ed931jul.fsf@localhost>
 <0a15da42-9d77-4d1b-bfda-6c3d26ec40ad@HIDDEN> <87le3be0kn.fsf@localhost>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87le3be0kn.fsf@localhost>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 66020-done
Cc: 66020-done <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 eggert@HIDDEN, Stefan Monnier <monnier@HIDDEN>,
 stefankangas@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 11/06/2024 22:33, Ihor Radchenko wrote:
>>> FYI, I just upgraded to the latest master, and observed some lines in
>>> *Async-native-compile-log*   inserted not at the end, but on the second
>>> line before last.
>>>
>>> Is it something others also see?
>> I have now pushed the proposed patch (with "before markers" behavior).
>>
>> Could you rebuild and see whether the async-native-compile scenario
>> improves?
> Back to normal now.

Perfect, thanks for checking.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020-done <at> debbugs.gnu.org:


Received: (at 66020-done) by debbugs.gnu.org; 11 Jun 2024 19:32:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 11 15:32:19 2024
Received: from localhost ([127.0.0.1]:36261 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sH7EB-0001Iw-6Y
	for submit <at> debbugs.gnu.org; Tue, 11 Jun 2024 15:32:19 -0400
Received: from mout02.posteo.de ([185.67.36.66]:38235)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1sH7E9-0001Ig-0c
 for 66020-done <at> debbugs.gnu.org; Tue, 11 Jun 2024 15:32:17 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 160AE240103
 for <66020-done <at> debbugs.gnu.org>; Tue, 11 Jun 2024 21:32:10 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1718134332; bh=K/IKg/y7jFE5GCZhZ3JVOLqDDyRQWfaZ3dXbGCMUFNA=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=RfZnMqN9f9dAuICxaN1wJMBKUWZWXC9qxMlO/9XZNZ3PUqYBuAZhnym5uank6QP0U
 mlcn3rZw277J63lZYXKXo++hfyOv0vYsfhP4/orXnLjw7OEmdyflXQllWUPlQLvdyT
 6iYRchWjM5HWnL2fhAuuQPGWC5pSVSbq1exDC+HMrGAUHxJ6H6pwK773kbGZ+RiDVp
 B+fbP2sy8iHp1XmpH+n+4SLXQJHDCxWHxmho/4j6CZBI4+NP9hqW6WycB3PfMtg+t7
 3u6WppaCcTHDqbtxvs77IyuP1YOub3oUj23e3hhd9L5sw9LB8MjZmVk6Wsa4PuGn0T
 OxnXX8XaNYDfA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VzJhn2f2Bz6tw9;
 Tue, 11 Jun 2024 21:32:09 +0200 (CEST)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
In-Reply-To: <0a15da42-9d77-4d1b-bfda-6c3d26ec40ad@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN> <838r8w3zr2.fsf@HIDDEN>
 <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN> <868qzwwoif.fsf@HIDDEN>
 <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
 <86o78bd473.fsf@HIDDEN> <15f746d0-e635-47a0-a613-2ea31523966a@HIDDEN>
 <5922967c-1a6e-4b6e-b299-37fb598e5eca@HIDDEN> <86frtk6kfs.fsf@HIDDEN>
 <jwv8qzbmyjp.fsf-monnier+emacs@HIDDEN> <87ed931jul.fsf@localhost>
 <0a15da42-9d77-4d1b-bfda-6c3d26ec40ad@HIDDEN>
Date: Tue, 11 Jun 2024 19:33:44 +0000
Message-ID: <87le3be0kn.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020-done
Cc: 66020-done <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 eggert@HIDDEN, Stefan Monnier <monnier@HIDDEN>,
 stefankangas@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Dmitry Gutov <dmitry@HIDDEN> writes:

>> FYI, I just upgraded to the latest master, and observed some lines in
>> *Async-native-compile-log*  inserted not at the end, but on the second
>> line before last.
>> 
>> Is it something others also see?
>
> I have now pushed the proposed patch (with "before markers" behavior).
>
> Could you rebuild and see whether the async-native-compile scenario 
> improves?

Back to normal now.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020-done <at> debbugs.gnu.org:


Received: (at 66020-done) by debbugs.gnu.org; 11 Jun 2024 18:09:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 11 14:09:20 2024
Received: from localhost ([127.0.0.1]:36230 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sH5vs-0007Pr-2M
	for submit <at> debbugs.gnu.org; Tue, 11 Jun 2024 14:09:20 -0400
Received: from wfhigh2-smtp.messagingengine.com ([64.147.123.153]:46835)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1sH5vp-0007Pe-9e
 for 66020-done <at> debbugs.gnu.org; Tue, 11 Jun 2024 14:09:18 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailfhigh.west.internal (Postfix) with ESMTP id 963C618000F6;
 Tue, 11 Jun 2024 14:09:12 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Tue, 11 Jun 2024 14:09:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm3; t=1718129352;
 x=1718215752; bh=ToYePKCZObKNWFnmtwFpsmyAiDarZDNAhPlHOBebClo=; b=
 W6jMsDOq8jyYZmU4Tk4jfJsGJsI9ZF2nD4NQGuKdku5dVTdXSxylRqqPwtJ0+mes
 iuVKIJq53LsNpQnclNywEvWrXja2e+2EM1UbtOpyYzP5OWRWnLM9Er8j1fVgNfI8
 54SBCFwPsaMaV0DzmCzfjF0DF+CQXkIeqUvCxZf5dPbBSU9siwjtbVAEBij7zkJo
 jI8XvuYXQ/vOnun1WbE8QKzWzO1AjK2ENW4hM2PJ0PYxN2UMf6ubXqhpQsJGMQZu
 xpT1fnbIWjFQB+2+DdXkjkst/HWOb6aFrJHpHtXx5hW6HOvaebBZiTRtDzmE//Kf
 R4PwPEeq4duG0/WyfvXCTQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718129352; x=
 1718215752; bh=ToYePKCZObKNWFnmtwFpsmyAiDarZDNAhPlHOBebClo=; b=a
 5GKtd4oohqRj5kYeE7HeW7uiqoS0y9Q3b41ma4IRcRFB/Er6LjGgoEeg73JiDnX9
 EKRvUM2jakj3mK6tganwqO5q4izun+VkH3ysYkCxNiDUgeCQcwZOs6S9dvBZihi2
 jl1KuefkMEgdHj3Op5772PyVuKmovzPJRJKwFjEsnh+aYAUO0vVB+7PEem0FRVLg
 XTpkZnjgsfh7R+jsYanG/oi/aOTMEjZmkj68S0MHV+bybNmNjZ0/vPs5lnfaioGK
 1zbfpz3lBIQ9VvRJJ/nKTvguWT5omcsTA90sh7r6VcAWcg6U0utJOXWYnV0W937Q
 7vQw+UGKLMuVLfY2pz8Wg==
X-ME-Sender: <xms:x5JoZjfKoFRx75UyAUDL0xcOt1VbDUg8YRjTgnjJF_R9KbzHq87ZhQ>
 <xme:x5JoZpOfzeLrQ-LROAhY-ZeSq5LcSjqnjAY8ZxgxA1Wi05D9IMGXqOWn63dRjTTmg
 RV3FlQd5jF24wTO9W8>
X-ME-Received: <xmr:x5JoZshbz9utCwWGVSfEmeDtZOl6kgr-rfZ-7n4rWdKKH6tce3UEl9kWSnG9x1LP7caS>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeduvddguddvtdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveeg
 udejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 gumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:x5JoZk8wAzVM248OsvkW_pobzFh_v91hp-gct7BI9Q3UjyIhfJF5-g>
 <xmx:x5JoZvtP2rbLjsufRr47b06m9hb-nt4l-b2rgfsXjnmOY9csveMciw>
 <xmx:x5JoZjEsGuWQ20jHEHJfOlA3UuSHB03Td13-R65tRlmwihpWtlsYcA>
 <xmx:x5JoZmNoor0spC0YkfO3rO19VmaRmZrJvUAGc9mYMJaf0g4SIwNHUw>
 <xmx:yJJoZjgrwaoXDkIacDR0qM_uSL_m3BESMF4540DEJGLom8PR2m4KoTfd>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 11 Jun 2024 14:09:08 -0400 (EDT)
Message-ID: <0a15da42-9d77-4d1b-bfda-6c3d26ec40ad@HIDDEN>
Date: Tue, 11 Jun 2024 21:09:05 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
To: Ihor Radchenko <yantar92@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN> <838r8w3zr2.fsf@HIDDEN>
 <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN> <868qzwwoif.fsf@HIDDEN>
 <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
 <86o78bd473.fsf@HIDDEN> <15f746d0-e635-47a0-a613-2ea31523966a@HIDDEN>
 <5922967c-1a6e-4b6e-b299-37fb598e5eca@HIDDEN> <86frtk6kfs.fsf@HIDDEN>
 <jwv8qzbmyjp.fsf-monnier+emacs@HIDDEN> <87ed931jul.fsf@localhost>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87ed931jul.fsf@localhost>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 66020-done
Cc: Eli Zaretskii <eliz@HIDDEN>, eggert@HIDDEN, stefankangas@HIDDEN,
 66020-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 11/06/2024 20:15, Ihor Radchenko wrote:
> Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors"<bug-gnu-emacs@HIDDEN>  writes:
> 
>>> Technically, this is okay, but I'd like to hear from Stefan about
>>> whether it's correct to insert process output before the markers.
>> AFAIK, when the insertion is done by the default process filter, it's
>> indeed done "before the markers".  I have no idea why it's done this
>> way and would have preferred it to be different in many cases, but it's
>> been that way forever and changing it would inevitably break some code.
> FYI, I just upgraded to the latest master, and observed some lines in
> *Async-native-compile-log*  inserted not at the end, but on the second
> line before last.
> 
> Is it something others also see?

I have now pushed the proposed patch (with "before markers" behavior).

Could you rebuild and see whether the async-native-compile scenario 
improves?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020-done <at> debbugs.gnu.org:


Received: (at 66020-done) by debbugs.gnu.org; 11 Jun 2024 17:14:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 11 13:14:21 2024
Received: from localhost ([127.0.0.1]:36210 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sH54e-00061x-MQ
	for submit <at> debbugs.gnu.org; Tue, 11 Jun 2024 13:14:21 -0400
Received: from mout02.posteo.de ([185.67.36.66]:57275)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1sH54d-00061i-8G
 for 66020-done <at> debbugs.gnu.org; Tue, 11 Jun 2024 13:14:19 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 474AF240101
 for <66020-done <at> debbugs.gnu.org>; Tue, 11 Jun 2024 19:14:13 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1718126054; bh=h0olI15o9U45nUwhJZrag992eTm9YElJETsvYtLQRaY=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=V0Y3m6J09fh3+gac6SvWpV/EndaBAaBbwApwUWhKOEb1RkRjde1RjqLC/GtBmHYED
 t4qQuikGQiwWOfJtj/ZXYEsofnXQcpMgTX/56PsAYMyYZcnh0NMCwsdH/iI7q09BK8
 hcp2DAvfxXWX81MiKU6zeG3DkHWR0VTwmSJAQhXz5fmnBgU9jOE4TfQomtsrFumUtZ
 KGiGoYpZoI7Kn015QFp99GdXlwkHi2TgcBcMFXpNJeDnN8YOmARmG4tsO+tJ9rB6AX
 WikTdHWcS7znC4Gw3QZdHOQrNwCir4wEOLmxvmXnWGRB7Ne9NJJrzhq0PJVx5CWuG3
 /53/RRHfNiHMA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VzFdZ1RV8z6tvn;
 Tue, 11 Jun 2024 19:14:09 +0200 (CEST)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
In-Reply-To: <jwv8qzbmyjp.fsf-monnier+emacs@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN> <838r8w3zr2.fsf@HIDDEN>
 <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN> <868qzwwoif.fsf@HIDDEN>
 <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
 <86o78bd473.fsf@HIDDEN> <15f746d0-e635-47a0-a613-2ea31523966a@HIDDEN>
 <5922967c-1a6e-4b6e-b299-37fb598e5eca@HIDDEN> <86frtk6kfs.fsf@HIDDEN>
 <jwv8qzbmyjp.fsf-monnier+emacs@HIDDEN>
Date: Tue, 11 Jun 2024 17:15:46 +0000
Message-ID: <87ed931jul.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020-done
Cc: Dmitry Gutov <dmitry@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 eggert@HIDDEN, stefankangas@HIDDEN, 66020-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@HIDDEN> writes:

>> Technically, this is okay, but I'd like to hear from Stefan about
>> whether it's correct to insert process output before the markers.
>
> AFAIK, when the insertion is done by the default process filter, it's
> indeed done "before the markers".  I have no idea why it's done this
> way and would have preferred it to be different in many cases, but it's
> been that way forever and changing it would inevitably break some code.

FYI, I just upgraded to the latest master, and observed some lines in
*Async-native-compile-log* inserted not at the end, but on the second
line before last.

Is it something others also see?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020-done <at> debbugs.gnu.org:


Received: (at 66020-done) by debbugs.gnu.org; 11 Jun 2024 16:33:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 11 12:33:02 2024
Received: from localhost ([127.0.0.1]:36075 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sH4Qg-0004pQ-IK
	for submit <at> debbugs.gnu.org; Tue, 11 Jun 2024 12:33:02 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38999)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1sH4Qf-0004ow-E5
 for 66020-done <at> debbugs.gnu.org; Tue, 11 Jun 2024 12:33:02 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C5A304424B4;
 Tue, 11 Jun 2024 08:55:55 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1718110554;
 bh=vDh/+HB7QEBppgFKPR+q5GtMxjo2lGE5YLjRTLLVXfk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=ohKzl9BbLaLEelzj23/njsWh6I12b8NC4D51fnNYr3OvkbUCuy3+tKZ635W06ZlUG
 MgcghzHon/fqQ19eruDNhRj3ZlYmS8LwCDvx9Oi3aFC3wRMUfv3IDFu0IuyjvPdCv3
 nzvb+trmrHoM7bMpQPxfG38X1iyXko4+bUl+uTyBa9ydwfhtUvSqc/uCDrciwVf/qL
 YN5TjNik862Veoiee9CChwfZjC3tkIJOhLx7x/I44lRe6tUDPvVqdE9kqe+u8QDSMv
 qR268dxE5snUzF5MnNI1p3RP3xTkimIqROHaMjyU50MMJwFS06bOtNYDXHzPV0eJrl
 0XreSy+0ch6Jw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9E4FC4420B8;
 Tue, 11 Jun 2024 08:55:54 -0400 (EDT)
Received: from pastel (unknown [24.140.236.196])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 61D9B12032C;
 Tue, 11 Jun 2024 08:55:54 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
In-Reply-To: <86frtk6kfs.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 11 Jun
 2024 09:51:51 +0300")
Message-ID: <jwv8qzbmyjp.fsf-monnier+emacs@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN>
 <838r8w3zr2.fsf@HIDDEN>
 <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN>
 <868qzwwoif.fsf@HIDDEN>
 <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
 <86o78bd473.fsf@HIDDEN>
 <15f746d0-e635-47a0-a613-2ea31523966a@HIDDEN>
 <5922967c-1a6e-4b6e-b299-37fb598e5eca@HIDDEN>
 <86frtk6kfs.fsf@HIDDEN>
Date: Tue, 11 Jun 2024 08:55:53 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.040 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020-done
Cc: Dmitry Gutov <dmitry@HIDDEN>, eggert@HIDDEN, stefankangas@HIDDEN,
 66020-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Technically, this is okay, but I'd like to hear from Stefan about
> whether it's correct to insert process output before the markers.

AFAIK, when the insertion is done by the default process filter, it's
indeed done "before the markers".  I have no idea why it's done this
way and would have preferred it to be different in many cases, but it's
been that way forever and changing it would inevitably break some code.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020-done <at> debbugs.gnu.org:


Received: (at 66020-done) by debbugs.gnu.org; 11 Jun 2024 16:01:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 11 12:01:14 2024
Received: from localhost ([127.0.0.1]:35861 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sH3vu-0000zv-FG
	for submit <at> debbugs.gnu.org; Tue, 11 Jun 2024 12:01:14 -0400
Received: from fout2-smtp.messagingengine.com ([103.168.172.145]:50295)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1sH3vq-0000zR-J2
 for 66020-done <at> debbugs.gnu.org; Tue, 11 Jun 2024 12:01:12 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailfout.nyi.internal (Postfix) with ESMTP id A3DD0138018F;
 Tue, 11 Jun 2024 07:41:10 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Tue, 11 Jun 2024 07:41:10 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm3; t=1718106070;
 x=1718192470; bh=bbqZ+JxQB1wwI+YE1Brh6McAYHw/17kKtAfgejnaKSc=; b=
 JC5+H0C/d9EIXN0vbwklxllDj9Hy9nr13NB7gsR0JWr1yDtCm/QYZkc/YzwLG56p
 TX7DH09FhJj6nyiY3u+2icQGR5+bBzIbzxJ/zZU5eMjOt09hpL7J4ZOrndQSllBo
 ZLcaktk/DVuSKoRJgqBOKjtSq+41M75idmSCFxA360fCwHYXydCxGkbnno9EvU5A
 s51OYbcRleVXbkPrYQ4Bqyg93W+hfAmiWtqgTG1B1h7lLd2QW50VX4ZjA3sAVUqm
 JfzqA3E35Kcby0BEVWPh0hwwgEC0rQqLoYOddvs3CT3a/FmBbIf9mlbxcoBfPlSk
 oBEpeQXUFxMm7PtqnM5/eA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718106070; x=
 1718192470; bh=bbqZ+JxQB1wwI+YE1Brh6McAYHw/17kKtAfgejnaKSc=; b=l
 /w40JrKdQMhKsyiJJP1bjRGDEsGMsbu35R9DW3zdTO70iNSxPoslm6qqcZ4c7Seg
 ANB1Ikevk5gjP6FkCBRznvyK1/SwJyD0gE9KV7/zv85jy9PxbmLo25lmxgIGKcCM
 psN16JOVoi03qtymnPrA2VDOhCicIoUDO8mBV7SVkfKoMwvBMRYVC4rhZMD0QFXE
 vDdUi8PVy+5wQQdaPQN99KcEpu25HV/MusJj1gOPRToAn7A54VupjJALy4gpB+IT
 y+6u5buuW3Fv0q0CR9+7AWefyJuR5PNzt3/KjXQZLvf8FZsO9xIZX1F+CnDydG2I
 2Kc9GKgUb/MqeINm/5PAg==
X-ME-Sender: <xms:1jdoZqJxryXHlVEy6bjsC61_ZCwgmpIjwrh1M-D2tmXUds0uTkgSuQ>
 <xme:1jdoZiIKGTEqFhU4KedYuasMbIYVosyFq-niQf_cCcNrsZb4FR0aMmqqwxl2AXEWe
 J8_CLzOsU6DuA4Sf04>
X-ME-Received: <xmr:1jdoZqs0fDFaqTVbnCC5TKn5zV9lyxMgKLGzPlchoHbJKOpHrfktFn1NEz8sb2qBMQlG>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeduvddggedvucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu
 jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:1jdoZvZ6u8VJcjSqX-FKWUbZom9ZWNaepPVPOjva3zc7LlEIboqVDA>
 <xmx:1jdoZhYjWIy4DglgXpPwKPiCUPlhFG1ZYoJsbFqvr8XWrO_9b7CcQQ>
 <xmx:1jdoZrBQO96-cmKK57i7x2FgOWpaua0lBgrt-qW1n1MliQwBZMjJxw>
 <xmx:1jdoZnYMnV70iL8hvOdUPZEeTXCSPl0BaEOZFEnNjsSnWwwyqFviPw>
 <xmx:1jdoZkzaMdypaNdbDeHBFIuOVSCJgfa-jcUIyzTQJp-VY5AORjSLd3rW>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 11 Jun 2024 07:41:08 -0400 (EDT)
Message-ID: <7f226168-8782-4b75-b670-5213bebb8223@HIDDEN>
Date: Tue, 11 Jun 2024 14:41:07 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
To: Eli Zaretskii <eliz@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN>
 <838r8w3zr2.fsf@HIDDEN>
 <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN>
 <868qzwwoif.fsf@HIDDEN>
 <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
 <86o78bd473.fsf@HIDDEN>
 <15f746d0-e635-47a0-a613-2ea31523966a@HIDDEN>
 <5922967c-1a6e-4b6e-b299-37fb598e5eca@HIDDEN>
 <86frtk6kfs.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86frtk6kfs.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 66020-done
Cc: 66020-done <at> debbugs.gnu.org, eggert@HIDDEN, stefankangas@HIDDEN,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 11/06/2024 09:51, Eli Zaretskii wrote:
>> Date: Tue, 11 Jun 2024 06:12:21 +0300
>> From: Dmitry Gutov<dmitry@HIDDEN>
>> Cc:eggert@HIDDEN,monnier@HIDDEN,66020-done <at> debbugs.gnu.org
>>
>> Is it okay to make adjust_markers_for_insert non-static and call it
>> here? See attached.
> Technically, this is okay, but I'd like to hear from Stefan about
> whether it's correct to insert process output before the markers.

FWIW, internal-default-process-filter calls 
insert_from_string_before_markers.

My goal is just to maintain compatibility.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020-done <at> debbugs.gnu.org:


Received: (at 66020-done) by debbugs.gnu.org; 11 Jun 2024 16:01:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 11 12:01:14 2024
Received: from localhost ([127.0.0.1]:35859 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sH3vu-0000zs-3O
	for submit <at> debbugs.gnu.org; Tue, 11 Jun 2024 12:01:14 -0400
Received: from fout2-smtp.messagingengine.com ([103.168.172.145]:58065)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1sH3vq-0000zQ-Iy
 for 66020-done <at> debbugs.gnu.org; Tue, 11 Jun 2024 12:01:12 -0400
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailfout.nyi.internal (Postfix) with ESMTP id 3705E13801ED;
 Mon, 10 Jun 2024 23:12:26 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute5.internal (MEProxy); Mon, 10 Jun 2024 23:12:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-type:content-type:date:date:from:from:in-reply-to
 :in-reply-to:message-id:mime-version:references:reply-to:subject
 :subject:to:to; s=fm3; t=1718075546; x=1718161946; bh=JK/GZPOTDL
 sXCy5cgLMXdq3udLzVSZItgMBX+ZxV8nI=; b=MpqwJRG/FNLG1fvYa6GIkjeAJD
 1sKgMeDLcsGYXjehCN6J3/nXaPBwPMyuXQ/l86IEK73xADZdJnPRoFk93tvYxCmS
 Jr8lBF8k0ehp14nV/vZuI0o5PgAzv967jOVi71AL8mUEtI6IaTrm16VHva78b1GS
 kuxRI6RLgtrEkSKKPmR9cc+rthEGIDw8WUxouwN9r2FtJiBluBvhwkJsjgEShyMy
 Yts7ghHKeWuHNbozY8gIi1jtpbb6mmgHaRYgnDQIGJMXZsI6LOmw3xUSP7zRywi4
 LprOTZznEwB9F1yDmAern63Y5ov23hbaWFdthaCQkPkmzDA3lF4qFrImaEFg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm1; t=1718075546; x=1718161946; bh=JK/GZPOTDLsXCy5cgLMXdq3udLzV
 SZItgMBX+ZxV8nI=; b=nhhWSzCyGymqN9QPLcMvXtZLKJ0U3ZKnBXJJ5qhzCnbA
 Y5iIRdLGgcszVliYnZI2n4GnQOIUfzNctyRbJHcQB3T7+jSLNCoURwWyDpdPx8aj
 07n5+SYj5eALGY7n4miYeQhSSKa7m6sAGEmZlyiNKxgp6m1fbke/rrZhsB/1bCM2
 LFHuvaC0STb5zg/P3DvvY+epTJJaIEe1bJIZUOCn785CYHLww9tWo8q/Cwa+Of2c
 teoUpw/An4RkWDzJc+FlcAb5yPsMdKWW2hpppPjuljY8rHr3PCxDYHZDwPY3B0EF
 yQML5wFARB3RFLVItiqdXUzAv/qmpijyxE9+nbYeiQ==
X-ME-Sender: <xms:mcBnZh9qIY_11BOuoZsG3oqjOxas1tQ-3RgWGB3bs5nSpijVMCQJwg>
 <xme:mcBnZlslHPX1OQX72Hr_EDxza9CLIvBd07hGzKsvIuTjCyZx-gtIHdPhQkKT-lq0t
 sBmyLQIV8s2kwL5MGg>
X-ME-Received: <xmr:mcBnZvAB0PduhjDHMIdCXJCWUBkxL20EMfkrwH8_RfbX_83RFg8SYPi2XWTeVAJYxz65>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeduuddgieejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurheptgfkffggfgfuhffvvehfjgesmhdtreertddvjeenucfhrhhomhepffhmihht
 rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth
 gvrhhnpedtvdeugedvteelvdegvefguedtgfethefggeffkedtkeegveeifeeiudejueff
 ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh
 hithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:mcBnZlffcZP0Kp1jnLLHIMwf89hf_RN2phPpKUjGANdTLdyTk6xoVQ>
 <xmx:mcBnZmMGnKg9Rg8oP8qshTMyeKRpivnR5WNdjAKOIgizRAgXZyCwng>
 <xmx:mcBnZnlGVjZKramitnOOLkoHcjhxlnD4JiEd7Gzw0Vy4cVo6dtNk-g>
 <xmx:mcBnZgtJNv6kmjxi2jlIwdPUZn2VjzW98M7Rzle66zjouZXKClSh_g>
 <xmx:msBnZt3g4ZpyQ9wMC14MwNyGduj0o-nCpcIuaVbYywcH0KNAp7jW_d3j>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 10 Jun 2024 23:12:24 -0400 (EDT)
Content-Type: multipart/mixed; boundary="------------4d5ZOQY3RYEeg7nAqkyMKYNl"
Message-ID: <5922967c-1a6e-4b6e-b299-37fb598e5eca@HIDDEN>
Date: Tue, 11 Jun 2024 06:12:21 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
From: Dmitry Gutov <dmitry@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN> <838r8w3zr2.fsf@HIDDEN>
 <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN> <868qzwwoif.fsf@HIDDEN>
 <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
 <86o78bd473.fsf@HIDDEN> <15f746d0-e635-47a0-a613-2ea31523966a@HIDDEN>
Content-Language: en-US
In-Reply-To: <15f746d0-e635-47a0-a613-2ea31523966a@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 66020-done
Cc: eggert@HIDDEN, monnier@HIDDEN, 66020-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is a multi-part message in MIME format.
--------------4d5ZOQY3RYEeg7nAqkyMKYNl
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 09/06/2024 03:12, Dmitry Gutov wrote:
>>>
>> I guess we can install all 3 patches and see if anything breaks.
> 
> Thank you, now pushed to master.

On the heels of bug#71452, I've pushed three updates.

Here's a third one (hopefully last) which I'd like a second opinion on. 
Process output -- apparently -- needs to be inserted before markers.

Is it okay to make adjust_markers_for_insert non-static and call it 
here? See attached.
--------------4d5ZOQY3RYEeg7nAqkyMKYNl
Content-Type: text/x-patch; charset=UTF-8;
 name="read_and_insert_process_output_before_markers.diff"
Content-Disposition: attachment;
 filename="read_and_insert_process_output_before_markers.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL3NyYy9pbnNkZWwuYyBiL3NyYy9pbnNkZWwuYwppbmRleCAzODA5Zjhi
YzA2MC4uZmJmNzFlMWU1OTUgMTAwNjQ0Ci0tLSBhL3NyYy9pbnNkZWwuYworKysgYi9zcmMv
aW5zZGVsLmMKQEAgLTI4NCw3ICsyODQsNyBAQCBhZGp1c3RfbWFya2Vyc19mb3JfZGVsZXRl
IChwdHJkaWZmX3QgZnJvbSwgcHRyZGlmZl90IGZyb21fYnl0ZSwKICAgIHdlIGFkdmFuY2Ug
aXQgaWYgZWl0aGVyIGl0cyBpbnNlcnRpb24tdHlwZSBpcyB0CiAgICBvciBCRUZ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oYXIsCisJCQkJIFBUX0JZVEUgKyBwcm9jZXNzX2NvZGluZy0+cHJvZHVjZWQs
IHRydWUpOwogICAgICAgdW5iaW5kX3RvIChjb3VudDEsIFFuaWwpOwogCiAgICAgICByZWFk
X3Byb2Nlc3Nfb3V0cHV0X3NldF9sYXN0X2NvZGluZ19zeXN0ZW0gKHAsIHByb2Nlc3NfY29k
aW5nKTsK

--------------4d5ZOQY3RYEeg7nAqkyMKYNl--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020-done <at> debbugs.gnu.org:


Received: (at 66020-done) by debbugs.gnu.org; 9 Jun 2024 01:40:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 08 21:40:21 2024
Received: from localhost ([127.0.0.1]:54304 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sG7Xg-00064o-Cs
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2024 21:40:21 -0400
Received: from wfout8-smtp.messagingengine.com ([64.147.123.151]:36525)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1sG6JT-0002Uc-D6
 for 66020-done <at> debbugs.gnu.org; Sat, 08 Jun 2024 20:21:36 -0400
Received: from compute6.internal (compute6.nyi.internal [10.202.2.47])
 by mailfout.west.internal (Postfix) with ESMTP id 154881C0007B;
 Sat,  8 Jun 2024 20:12:21 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute6.internal (MEProxy); Sat, 08 Jun 2024 20:12:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm3; t=1717891940;
 x=1717978340; bh=5YdgAUazwrFeEAcxH+jrQHohYJmVLq6K6wgEh339Zbg=; b=
 HQghM3JD3y583PI0UJL+rebIUoULqaqvBDkj4xwMVwoqB8uCVgbBsJyFr9Rb3DoU
 A9je4O6cSl7khCrzz9Ei4wOW6GHAFHon8PB0sBcOXr5cZ1bDngLiFQUTnBhJU0Ks
 tdMnUfcG75bDcg7z7snTLu653JaVVz2bvt2pIYhbN01SBhudSICXJw6zRgp43/bu
 eKioySt8Pqe5FQsNjZsdlDGrlD3HlkzoWu3oY3GqBZcdFR/Nu1WZB2W4ZOTkT8Lf
 +oHkwn49KzxQKwwvRCDPj1jQNJDFAFvwgslqwwrygilklDDoFlgAeGFewBk3RqHZ
 +pnQmxx53+ISP6syiC61aA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1717891940; x=
 1717978340; bh=5YdgAUazwrFeEAcxH+jrQHohYJmVLq6K6wgEh339Zbg=; b=E
 PllIcTZd+khkqNipZ4n9us8I17yWYq8oJwS9FTPvsdmpLNofv79M6V/aVTo2tEE4
 dSpBgQ3oqNCUWIS7A26ZdLtBhtilMhe32ex2Ke7/rFrsS7keXz57X/qFFBNM5PCF
 dZVJtXQKEUJ27MxF6BXnply032aAQlrTQO+CQPKkON4oBNU37rF+e9A9NJlBAR2V
 tTwxlcD0/m0X0mvnHxekOxZ7agWeA79vxVFRgrrVm9WEDmC4jpejUOytcocUNOPl
 qFjT9uuKVKNMlEQXYAt7KdcU0VNOj5BFSreQdmm2zt666PFMeELTcs4PZlEoUDwj
 1CoW1TiCuVyh0pyI4COkw==
X-ME-Sender: <xms:ZPNkZlCbQk8H4uP9bsFz7okH0i50WWWgOfQrHLAhOZWNUEyySygoNQ>
 <xme:ZPNkZjgdnGxIx5SRC-v9EUxmZuqG7V3dVP47Tuk9j7equIHLW7dxFv-XsgtRRS7i_
 -RWNG6Fs-cZMwTNYeQ>
X-ME-Received: <xmr:ZPNkZgkZufceVykvRD0aNCK2G6awb7cN5m5YhapPJZH-GUM3vUCNbpSQmMgVnyjAVKV8>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedthedgfeduucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepffeifedvleeukedtgfelieegudfgveekfeejveejffetffeuueeugefhveei
 uddvnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc
 frrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:ZPNkZvwqfe3xgqqYLWSSNmH4S-FGMbxWRAvljcF3W9EnRBWLkikhhA>
 <xmx:ZPNkZqR5fff_cEvUU3LED5Kou3zIku6ZIhTQzwsGeWtEi9l88G3uOA>
 <xmx:ZPNkZia_zPfw43MNzmvO-jM4v24tCTthBLhDKEQGtFA7z-YzCQLzZQ>
 <xmx:ZPNkZrQYjxPvbSNB8zc9PuaZphfopVecn0g2G4XD27Aj88BPeNEd4A>
 <xmx:ZPNkZnJrmah5D-tNlQ4m0Td7vIJs9DVRPUse7ZA3fcA30Ph87JOhxShz>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 8 Jun 2024 20:12:18 -0400 (EDT)
Message-ID: <15f746d0-e635-47a0-a613-2ea31523966a@HIDDEN>
Date: Sun, 9 Jun 2024 03:12:16 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
To: Eli Zaretskii <eliz@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN> <838r8w3zr2.fsf@HIDDEN>
 <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN> <868qzwwoif.fsf@HIDDEN>
 <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
 <86o78bd473.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86o78bd473.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 66020-done
Cc: eggert@HIDDEN, monnier@HIDDEN, 66020-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 08/06/2024 15:11, Eli Zaretskii wrote:
>> From: Stefan Kangas<stefankangas@HIDDEN>
>> Date: Sun, 26 May 2024 16:27:19 -0700
>> Cc:66020 <at> debbugs.gnu.org,monnier@HIDDEN
>>
>> Eli Zaretskii<eliz@HIDDEN>  writes:
>>
>>> I'll try to recollect the discussion and review the patches one of
>>> these days.
>>>
>>> Paul, your input (as well as that of everybody else on the CC list)
>>> will be most welcome.
>> FWIW, I'd be in favor of raising `read-process-output-max' to something
>> like 40960 (as Eli suggested in this thread), or perhaps some power of 2
>> close to that like 32768 or 65536.
>>
>> This is based on it being seemingly faster in the benchmarks in this
>> thread, and me having used that locally for 2-3 years and noting no
>> adverse effects.
>>
>> See also the discussion here:
>> https://lists.gnu.org/r/emacs-devel/2021-03/msg01461.html
>>
>> (I didn't review patch 1 and 2, so no opinion on those.)
> I guess we can install all 3 patches and see if anything breaks.

Thank you, now pushed to master.

For read-process-output-max, I chose the higher of the powers of two, 
but please feel free to amend.




Notification sent to Dmitry Gutov <dmitry@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Dmitry Gutov <dmitry@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 8 Jun 2024 12:12:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 08 08:12:13 2024
Received: from localhost ([127.0.0.1]:37695 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFuvd-0002xO-15
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2024 08:12:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56318)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sFuvY-0002x2-V2
 for 66020 <at> debbugs.gnu.org; Sat, 08 Jun 2024 08:12:11 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sFuvC-0002ug-W6; Sat, 08 Jun 2024 08:11:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=O7X3A19mnLCX9R8Pg9VOnU2tsbH25kHNg1GeXWYPFNY=; b=PMft6w2rx91z
 IW+pa3qd9aCG8WrsMpVjQ9a3aBd0ir5Uycu238Ob8uEYKF0PSCMp6vCgBOsPxhgQbISNGohL+ByGV
 QzptA+5gDqrG/mBH/PcJbPZaFSgtcvEcuOBt4M+BYwjtJ4FE4b3s9q2KqX/bqlnkdKR0jyJnYsyvC
 OzETjylnXt0WjQ+X2f9ioFk/jsrWUtwJwV4KEt5ITKxWLa4Y2CJ0C+zKwPDfXnFkXMqR8tVje4TI3
 HG61SEKqYJ1gHWBeG6864tsS+b+vupbEnco828Cj003bFeHZeLRpGWrKw5+1C9WfSQOUoKfp6x3Se
 dkO0E1kXgPPGHydRAW/6CQ==;
Date: Sat, 08 Jun 2024 15:11:44 +0300
Message-Id: <86o78bd473.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>, dmitry@HIDDEN
In-Reply-To: <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
 (message from Stefan Kangas on Sun, 26 May 2024 16:27:19 -0700)
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN> <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN> <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN> <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN> <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN> <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN> <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <83led09dlk.fsf@HIDDEN> <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN>
 <838r8w3zr2.fsf@HIDDEN> <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN>
 <868qzwwoif.fsf@HIDDEN>
 <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: eggert@HIDDEN, 66020 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Kangas <stefankangas@HIDDEN>
> Date: Sun, 26 May 2024 16:27:19 -0700
> Cc: 66020 <at> debbugs.gnu.org, monnier@HIDDEN
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > I'll try to recollect the discussion and review the patches one of
> > these days.
> >
> > Paul, your input (as well as that of everybody else on the CC list)
> > will be most welcome.
> 
> FWIW, I'd be in favor of raising `read-process-output-max' to something
> like 40960 (as Eli suggested in this thread), or perhaps some power of 2
> close to that like 32768 or 65536.
> 
> This is based on it being seemingly faster in the benchmarks in this
> thread, and me having used that locally for 2-3 years and noting no
> adverse effects.
> 
> See also the discussion here:
> https://lists.gnu.org/r/emacs-devel/2021-03/msg01461.html
> 
> (I didn't review patch 1 and 2, so no opinion on those.)

I guess we can install all 3 patches and see if anything breaks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 26 May 2024 23:28:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 26 19:28:36 2024
Received: from localhost ([127.0.0.1]:42737 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sBNI4-0002ly-AQ
	for submit <at> debbugs.gnu.org; Sun, 26 May 2024 19:28:36 -0400
Received: from mail-lj1-f171.google.com ([209.85.208.171]:59782)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1sBNI2-0002lm-In
 for 66020 <at> debbugs.gnu.org; Sun, 26 May 2024 19:28:35 -0400
Received: by mail-lj1-f171.google.com with SMTP id
 38308e7fff4ca-2e724bc466fso93032691fa.3
 for <66020 <at> debbugs.gnu.org>; Sun, 26 May 2024 16:28:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1716766040; x=1717370840; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=1F4X5Gb1wLfMOJekEIh10Q4kBJVeuHTsDmjbQfEcKpk=;
 b=HrNlMuASq47zSDVkjxEdhuXEjxbyeoKjCsQRVM+zAiPuOBstFoK1nBcA7quRSaIDeG
 XDqsLqzc3cOG9wo3q/vTCAUt6qgdr3gYjaiG+p8MM9o8/cD6OhrYytHNLtm/v7F2YzBn
 ZRgO/R60pOXuwK2r2CKQFCpHPz+hYP+W84kPP9YwZZ9qHdKV4nCrLnNlYwJBrSg0VX7u
 k53QuQZO+65DO3qRXgYFSchr9HP6nnwL06iVE1m1rowRNCRYhzfimQtPWjtr6GqpHZm9
 c+eR3uq1yQn4y3aaYx1vgGrjYx4kft+TVdur5YCzk9Zmhme91SSYU8hwf6+zMPyk4WhB
 Hchw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1716766040; x=1717370840;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=1F4X5Gb1wLfMOJekEIh10Q4kBJVeuHTsDmjbQfEcKpk=;
 b=plWZ7NTmYjP1yXAokIdk1YJerxRbpRnw7xajSWnXYYZ7ShDlx5GDlWLtA4ZDPVdmiB
 zfGW+7JIk5OBl3i9Z1O9MeV5cMZolVU/siwxWqdSo9mhkwUkGn+XLo2s3qUUUVCxz6uF
 yyJLMnuQS17tdLmVyxm5T17fevWlDJB7kla3nrcE/52C5aY4JZsGIN16QR4iHHVW90Ox
 OpLPK6TgSroLYdNtulH55HnGMFkeu9DufmvN3mYkkfm7AhE3wkkscJGcyBTAtnKBsycD
 6SLuA6+sBbZs8Ow4l2UCZ1d/AQ0F6keVPD3/HtCvqoyzXMldu0/P6epbkatgF2S/jxmV
 meJw==
X-Gm-Message-State: AOJu0YxI+Jb5J0t1mSmEbqg6imiK9/ZtUs9ii1oiKe0sq+O2k2hwcRRs
 Hh/9dgLDQdECGDfqgorP4/I3NgzQgdMG0YtMbS8XuqHQkDd87q+lgVnN5ejJGWV+dnGmZ4/YhJU
 lcLHOGoxXBmOGlQBJDAr6QBIVLs8=
X-Google-Smtp-Source: AGHT+IHLGAuhHqLhw37DlFWRBQqG/8zpUQ2TYSxCMDItyUUTh5ScQ00IJOgn4BUDpAxfkmLvWVDTt3C0NrzHlNYApgc=
X-Received: by 2002:a05:651c:88:b0:2e5:5b9f:7732 with SMTP id
 38308e7fff4ca-2e95b0c4d16mr68146731fa.26.1716766040105; Sun, 26 May 2024
 16:27:20 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sun, 26 May 2024 16:27:19 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <868qzwwoif.fsf@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN> <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN> <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN> <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN> <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN> <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN> <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <83led09dlk.fsf@HIDDEN> <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN>
 <838r8w3zr2.fsf@HIDDEN> <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN>
 <868qzwwoif.fsf@HIDDEN>
MIME-Version: 1.0
Date: Sun, 26 May 2024 16:27:19 -0700
Message-ID: <CADwFkmkQkjSyLSAt=ieYQirRdWfkjWROh9ec+EY4CRyFaCB5Fg@HIDDEN>
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
To: Eli Zaretskii <eliz@HIDDEN>, eggert@HIDDEN,
 Dmitry Gutov <dmitry@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> I'll try to recollect the discussion and review the patches one of
> these days.
>
> Paul, your input (as well as that of everybody else on the CC list)
> will be most welcome.

FWIW, I'd be in favor of raising `read-process-output-max' to something
like 40960 (as Eli suggested in this thread), or perhaps some power of 2
close to that like 32768 or 65536.

This is based on it being seemingly faster in the benchmarks in this
thread, and me having used that locally for 2-3 years and noting no
adverse effects.

See also the discussion here:
https://lists.gnu.org/r/emacs-devel/2021-03/msg01461.html

(I didn't review patch 1 and 2, so no opinion on those.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 26 May 2024 16:02:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 26 12:02:05 2024
Received: from localhost ([127.0.0.1]:42328 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sBGJx-0006vM-KU
	for submit <at> debbugs.gnu.org; Sun, 26 May 2024 12:02:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sBGJv-0006ur-99
 for 66020 <at> debbugs.gnu.org; Sun, 26 May 2024 12:02:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sBGJg-0000x4-FZ; Sun, 26 May 2024 12:01:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=i8qSQyBFhxby8HdwHvDdQAuOgaFE+g87k0lxFse1RGw=; b=gczRBiLvzACu
 3vdEMmJAhi43THeMseh9jPwnO3M+Vz9z9J9PItwxW6K9Y3x0WtSqmeM+UdlnGUy69Hz6HYpD6lxdL
 E9ST06VaJj+/RIVEsOL1VqU2hoEICYJtIeMNlLFDP5MUcyacQ+UpP846LuFgLKOtLMaFIYJnAGBl9
 ocj4bs1dJPymbjszoLXocCXl1XlCAH23K0W7cozIe4ptBVXhhuIpA8TPOalY5ZinQuBwYVSSoM+zy
 bE78zjYwEMFJJM6R3hcwN7o6f0aTEwgGocQB+7wrCcp6ao/P6u/e6TIY6YkCl+qbJDkpXmx0vMDlM
 yFICQAzaMF9tkVw/ZDU0QQ==;
Date: Sun, 26 May 2024 19:01:44 +0300
Message-Id: <868qzwwoif.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: eggert@HIDDEN, Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN> (message from
 Dmitry Gutov on Sun, 26 May 2024 18:20:15 +0300)
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN>
 <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN>
 <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN>
 <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN>
 <838r8w3zr2.fsf@HIDDEN> <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 66020
Cc: stefankangas@HIDDEN, 66020 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

> Date: Sun, 26 May 2024 18:20:15 +0300
> Cc: 66020 <at> debbugs.gnu.org, monnier@HIDDEN, stefankangas@HIDDEN
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> Hi Paul and Eli,
> 
> On 24/09/2023 08:29, Eli Zaretskii wrote:
> 
> >> What do people think?
> > I think we should increase the default size, and the rest (querying
> > the system about the pipe size) looks like an unnecessary complication
> > to me.
> > 
> > I've added Paul Eggert to this discussion, as I'd like to hear his
> > opinions about this stuff.
> 
> Do you think we can get this in before the emacs-30 branch is cut?

I'll try to recollect the discussion and review the patches one of
these days.

Paul, your input (as well as that of everybody else on the CC list)
will be most welcome.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 26 May 2024 15:20:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 26 11:20:38 2024
Received: from localhost ([127.0.0.1]:42271 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sBFfp-0005pY-Py
	for submit <at> debbugs.gnu.org; Sun, 26 May 2024 11:20:38 -0400
Received: from wfhigh3-smtp.messagingengine.com ([64.147.123.154]:37007)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1sBFfn-0005pJ-LP
 for 66020 <at> debbugs.gnu.org; Sun, 26 May 2024 11:20:36 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailfhigh.west.internal (Postfix) with ESMTP id A46D518000E5;
 Sun, 26 May 2024 11:20:20 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Sun, 26 May 2024 11:20:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm3; t=1716736820;
 x=1716823220; bh=a1KxVJm+Di2yhsxzUwmKb5u1t9iX+azdhR5336hW++o=; b=
 X2flwrCEKdWTcV6ENfr3EmKiBsSOuzfvBKoPEv6zeSSwoH1K1wRI9YLWQUwTunVv
 TK5SrZPGMNUOgWQRMgenGcB4OCqMxlXX0EEz+9okbO2VEudr4zg5xq9PZBuaHTpA
 MlUP6Lu+eooAaM2An758aqmiuh5aMG+wjmMyPMG44Dm1oM4y11dFSHGU6UvrmLY0
 0I8dMK752gFCfsUfcQ2sOKRABJw/XMnjz1xgKGvwL5luTqUjp9a7/yz7F3DZ0dRw
 Qcic23Icp9LApZjgvXeOOpTULH6Xce5TL6W5zRg6vlUeVR8jzHqgnPxBrpdA+3Vn
 LHSlctuN0u0QagOtBnv8cA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1716736820; x=
 1716823220; bh=a1KxVJm+Di2yhsxzUwmKb5u1t9iX+azdhR5336hW++o=; b=c
 gCqgpl+DVL6fZwxTSDZdRQdixDuYHb8WBUFV/olmmBxc9N0Jwe0VAZ8Jb/X67bjV
 OjwaSpd9K4opMg3NIyKkKzqoxJVDqMFoHFMnquoSKj6cvQjyxdpeJvak71i0LrzQ
 Zc9yhovVUtYww2OZ+dGeTn4DTJo/OvACNp32mO1TrrzS2LdoH1S8flzPJPHrMmEM
 SJzkQWXEkIkJNIw4LdtIgdrDj1KRvtYvLgf9wkgID4NO9BU2PIXN32DzHCXq5yBF
 aymsa09WjT4tgKk6s1SwK7h6R+mEx072Ylh+SvOcgS6edjSCYKCWUS0eBIqZnQan
 VCU3lMQRaEo1DgOBdHOKg==
X-ME-Sender: <xms:M1NTZueEeunzeUs66X1VC-FuAQoMoy-K5Vjx9oUQPcsPltrDPBXMDQ>
 <xme:M1NTZoM8fJvZ75x-GDLIsbch9gyfQgRCV-uaWN0cT0yqlkPTlv5ud7TB09YSRdeqb
 Lrh8-fHWlqXviSPdEk>
X-ME-Received: <xmr:M1NTZvjNZywNogF15yZQoq3mc5I3_T_f34gVZDyaITJQFokhk-lr0-PhFiOT0o5Ws4_a>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejvddgkeejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu
 jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:M1NTZr_uwmCDeLs4N6iG0avKeytwutyi-1bBZNq-bRS_-K4oZk7FUA>
 <xmx:M1NTZqsF10tyu8Jh6a9N-faKxa-CNqwBta9_7BxXUjAs2PWOhraKRw>
 <xmx:M1NTZiGoL3754jnd3e7nwg8blSOeGSa-BFQOD998_Y4wOXyMUfhTjg>
 <xmx:M1NTZpPNYZpOrNR9RHo3VUIvkMtJY0aoA6RvyvxtdLkALjHukj_Klg>
 <xmx:NFNTZsVTquKVuO-jwle_ynn-NL2ddHyuJ4OM3ViYZT09SbuvFhzjg0pl>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 26 May 2024 11:20:18 -0400 (EDT)
Message-ID: <b18c3319-4064-4cbd-ad21-376372d424d0@HIDDEN>
Date: Sun, 26 May 2024 18:20:15 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
To: Eli Zaretskii <eliz@HIDDEN>, Paul Eggert <eggert@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN>
 <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN>
 <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN>
 <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN>
 <838r8w3zr2.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <838r8w3zr2.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 66020
Cc: stefankangas@HIDDEN, 66020 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Paul and Eli,

On 24/09/2023 08:29, Eli Zaretskii wrote:

>> What do people think?
> I think we should increase the default size, and the rest (querying
> the system about the pipe size) looks like an unnecessary complication
> to me.
> 
> I've added Paul Eggert to this discussion, as I'd like to hear his
> opinions about this stuff.

Do you think we can get this in before the emacs-30 branch is cut?

To summarize:

* Patch 1 (reduces consing when the default filter is used by moving it 
into C - skipping the creation of Lisp strings).
* Patch 2
   a) It ensures that the dynamic binding of read-process-output-max is 
saved when the process it created and used for its processing - ensuring 
that the current dynamic value is not just used when creating the pipe, 
but also later when reading from it.
   b) A few lines are outdated: part of the fix went in with bug#66288.
* Patch 3 can be replaced with just upping the default value of 
read-process-output-max to 65536.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 24 Sep 2023 05:30:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 24 01:30:23 2023
Received: from localhost ([127.0.0.1]:40883 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qkHhG-0002O7-NG
	for submit <at> debbugs.gnu.org; Sun, 24 Sep 2023 01:30:23 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51246)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qkHhE-0002Nv-Gn
 for 66020 <at> debbugs.gnu.org; Sun, 24 Sep 2023 01:30:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qkHgw-0006DQ-B3; Sun, 24 Sep 2023 01:30:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=hx69whFCd6nyy29p7bUM4wOGv5p/g0ZvrUmpFVz56Jc=; b=mwt1xBgAA83j
 YEZC/tlgMM5rYCq0TqeY9og5I+BUm5/LCvBHyfmAv+DYoWEekfHFdoHcfjsNAZDuLMeqgXqin2jaP
 nMuegghUbsyAgHmRzxBPUTWHElHUgKbGFUIwWhI0UT/drdcLUBP4zAXo4mPYYH/UrI1rzwbwDZkoC
 XiV//cemEVBS0aFoI2cNw/0wgnwJYrpQ37IL0jetQ0Yl22f5IDat8UZKiwgg8Efpd6+Yf9DdgQmBI
 4gHVYr+FCmZcWBN51RyqHFFAFt3Gpdg9QAeoiNn3KBptXxxyVpLUCbRWW03az6/uvHHDdJrlhvKjr
 uxpeUsVh8tc1R6XRilVWUg==;
Date: Sun, 24 Sep 2023 08:29:37 +0300
Message-Id: <838r8w3zr2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN> (message from
 Dmitry Gutov on Sun, 24 Sep 2023 00:51:28 +0300)
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN> <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN>
 <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN>
 <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN>
 <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN>
 <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
 <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: Paul Eggert <eggert@HIDDEN>, stefankangas@HIDDEN,
 66020 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 24 Sep 2023 00:51:28 +0300
> From: Dmitry Gutov <dmitry@HIDDEN>
> Cc: 66020 <at> debbugs.gnu.org, monnier@HIDDEN, stefankangas@HIDDEN
> 
> But it seems I've found an answer to one previous question: "can we find 
> out how much is already buffered in advance?"
> 
> The patch below asks that from the OS (how portable is this? not sure) 
> and allocates a larger buffer when more output has been buffered. If we 
> keep OS's default value of pipe buffer size (64K on Linux and 16K-ish on 
> macOS, according to 
> https://unix.stackexchange.com/questions/11946/how-big-is-the-pipe-buffer), 
> that means auto-scaling the buffer on Emacs's side depending on how much 
> the process outputs. The effect on performance is similar to the 
> previous (looping) patch (0.70 -> 0.65), and is comparable to bumping 
> read-process-output-max to 65536.
> 
> So if we do decide to bump the default, I suppose the below should not 
> be necessary. And I don't know whether we should be concerned about 
> fragmentation: this way buffers do get allocates in different sizes 
> (almost always multiples of 4096, but with rare exceptions among larger 
> values).
> 
> diff --git a/src/process.c b/src/process.c
> index 2376d0f288d..13cf6d6c50d 100644
> --- a/src/process.c
> +++ b/src/process.c
> @@ -6137,7 +6145,18 @@
>     specpdl_ref count = SPECPDL_INDEX ();
>     Lisp_Object odeactivate;
>     char *chars;
> 
> +#ifdef USABLE_FIONREAD
> +#ifdef DATAGRAM_SOCKETS
> +  if (!DATAGRAM_CHAN_P (channel))
> +#endif
> +    {
> +      int available_read;
> +      ioctl (p->infd, FIONREAD, &available_read);
> +      readmax = MAX (readmax, available_read);
> +    }
> +#endif
> +
>     USE_SAFE_ALLOCA;
>     chars = SAFE_ALLOCA (sizeof coding->carryover + readmax);
> 
> What do people think?

I think we should increase the default size, and the rest (querying
the system about the pipe size) looks like an unnecessary complication
to me.

I've added Paul Eggert to this discussion, as I'd like to hear his
opinions about this stuff.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 23 Sep 2023 22:46:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 23 18:46:13 2023
Received: from localhost ([127.0.0.1]:40749 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qkBO8-0008MT-Ms
	for submit <at> debbugs.gnu.org; Sat, 23 Sep 2023 18:46:13 -0400
Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:46099)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qkBO3-0008Ls-5h
 for 66020 <at> debbugs.gnu.org; Sat, 23 Sep 2023 18:46:11 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id 8E1DC320093E;
 Sat, 23 Sep 2023 18:45:49 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Sat, 23 Sep 2023 18:45:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :content-type:content-type:date:date:from:from:in-reply-to
 :in-reply-to:message-id:mime-version:references:reply-to:sender
 :subject:subject:to:to; s=fm1; t=1695509149; x=1695595549; bh=SK
 ukJsMAtn0ZO4R01C6lpu2DbBMqwdwX7I/0rIOpOUA=; b=AxUJA6rjNaFQi7ykHm
 2pKV6980UYrhMNlRrZEOkBUffzoq04OGGAH7DrDsh1DQSpUid3UWtYpFO6qhhhfb
 wwuygQCFE4jn+IE3B1NQLmlkq8n5MO/UNFKc7r1ClsllpEBEEP9JfZN+9LfOkwpL
 rcVEWUTqgGDtEJlsFoF5SRxMSTGK9PLpJj05P8heRggdj1G/n3cy8IUu/r0UJylY
 gFgpVXt86Ynwu5G147b/fRq0Rync9WeJ/dK55LJH88iEyrlS6kK8FH5B8cWx72Jo
 h7opXyMpUJlRWp/0cBze8uaFIt+F6pgaPxgKZURrNkYKCLthMVdkQ0N2clF9H/7z
 Abig==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:sender:subject
 :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm2; t=1695509149; x=1695595549; bh=SKukJsMAtn0ZO
 4R01C6lpu2DbBMqwdwX7I/0rIOpOUA=; b=Z/iY1ygySB1YHKuzH81Veyrziejdg
 J9PwYZzXTC7XSJtMT4KfkJtkfYFAsdnH+2f94JP8gpijM8xRUAfOAaGxXfOv//MZ
 aR+hHDhKk1VkmIZ6qRwRGDUOf+M/4Vj5CJ7rNdDyUKE7KFq49akh52FQjU5K0rvb
 cA3z5XQhpgW1iElD0qbTsZdJYCO7qEeV7oP8z9OfXyhQ08wers6ILaGNtQG9irpr
 SuNtErSaJA76BC3ps5yt0TutbUVplFYzPQXRPqzU1ZSoZhY3lcVagsqu51mp3Eh4
 ovITuZ4Rg0NI8POWWGN67xfps3gb8Y7YGrunki6R3TkahvR/XorVZOk6Q==
X-ME-Sender: <xms:nGoPZWZFNJlv541o9RXrjXMHi5_S8KnqD-Tjcsf27pPrYIX9xb9myA>
 <xme:nGoPZZZMmee40Y5WhnViwxL8EP-HcaT0Lw5zYuRpDWIdkYguVuMD5eCfCm9KkqKsB
 DEFQGXlXL_I6mCwGq8>
X-ME-Received: <xmr:nGoPZQ-4vPx3H0Yg84sGw39Rmw0HhYrr1LhAEWGI1RZIpIUkRGdam1xO8UAp2X8>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeluddgudehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurheptgfkffggfgfuhffvfhgjsehmtderredtfeejnecuhfhrohhmpeffmhhithhr
 hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg
 hrnhepveeghedvudegjeeigeeujefftdffieehtdejtdevgfevheeiueeuteffffefiefg
 necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih
 htrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:nGoPZYpEbx6WSlorKlnrgYA4NlwUOFBZyItAsQlGj1J_C8mHQbF3Sg>
 <xmx:nGoPZRrvbwTbaOsJSGI5RNCqy3lGHYotvg7Cef5kBLdonw2VDp6CpA>
 <xmx:nGoPZWTGWO3RdrL_22atFpfyecE-cG0gUem94OZKlckQs-BGIPsjxQ>
 <xmx:nWoPZY0FfIlZ_IdkTbBai3Ki226tyCFqZjN12IRfjqEsxxSUc2mWRA>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 23 Sep 2023 18:45:47 -0400 (EDT)
Content-Type: multipart/mixed; boundary="------------DyANkJr4Sjysej9e6FAKU5xu"
Message-ID: <5671e412-a23f-2d86-1e8d-985946685eca@HIDDEN>
Date: Sun, 24 Sep 2023 01:45:46 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: Re: bug#66020: [PATCH] Reduce GC churn in read_process_output
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
To: 66020 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>,
 Stefan Kangas <stefankangas@HIDDEN>
References: <3a6287c3-8458-663e-ffce-8f48b30bf73d@HIDDEN>
In-Reply-To: <3a6287c3-8458-663e-ffce-8f48b30bf73d@HIDDEN>
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 66020
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.2 (---)

This is a multi-part message in MIME format.
--------------DyANkJr4Sjysej9e6FAKU5xu
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Here are the previously discussed patches, collected in one place for 
easier review.

As explained, the last one is more experimental, a possible alternative 
to bumping read-process-output-max to 65536.
--------------DyANkJr4Sjysej9e6FAKU5xu
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Go-around-calling-the-default-process-filter-reducin.patch"
Content-Disposition: attachment;
 filename*0="0001-Go-around-calling-the-default-process-filter-reducin.pa";
 filename*1="tch"
Content-Transfer-Encoding: base64

RnJvbSAwMDgyZmNlNDViNjc3ZjdmOTJkMWE0Y2JhYzViMTJiNzYzOTQxYWQyIE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBEbWl0cnkgR3V0b3YgPGRtaXRyeUBndXRvdi5kZXY+
CkRhdGU6IFN1biwgMjQgU2VwIDIwMjMgMDE6MTk6MTQgKzAzMDAKU3ViamVjdDogW1BBVENI
IDEvM10gR28gYXJvdW5kIGNhbGxpbmcgdGhlIGRlZmF1bHQgcHJvY2VzcyBmaWx0ZXIgKHJl
ZHVjaW5nIEdDCiBjaHVybikKCkluc3RlYWQgb2YgYWxsb2NhdGluZyBzdHJpbmdzIGFuZCBw
YXNzaW5nIHRoZW0gdG8gdGhlIGZpbHRlciwgcGFzc2luZwp0aGUgY2hhciBidWZmZXIgdG8g
YSBDIGZ1bmN0aW9uIGltcGxlbWVudGluZyB0aGUgc2FtZSBsb2dpYy4KCiogc3JjL3Byb2Nl
c3MuYyAocmVhZF9wcm9jZXNzX291dHB1dF9iZWZvcmVfaW5zZXJ0KQoocmVhZF9wcm9jZXNz
X291dHB1dF9hZnRlcl9pbnNlcnQpOiBOZXcgZnVuY3Rpb25zLCBleHRyYWN0ZWQgZnJvbQ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ZS1tYXgt
c2l6ZS4gIFNlZSBwaXBlKDcpIG1hbnBhZ2UgZm9yIGRldGFpbHMuICAqLyk7CiAgIHJlYWRf
cHJvY2Vzc19vdXRwdXRfbWF4ID0gNDA5NjsKIAorICBERUZWQVJfQk9PTCAoInJlYWQtcHJv
Y2Vzcy1vdXRwdXQtZmFzdCIsIHJlYWRfcHJvY2Vzc19vdXRwdXRfZmFzdCwKKwkgICAgICAg
ZG9jOiAvKiBOb24tbmlsIHRvIG9wdGltaXplIHRoZSBpbnNlcnRpb24gb2YgcHJvY2VzcyBv
dXRwdXQuCitXZSBza2lwIGNhbGxpbmcgYGludGVybmFsLWRlZmF1bHQtcHJvY2Vzcy1maWx0
ZXInIGFuZCBkb24ndCBhbGxvY2F0ZQordGhlIExpc3Agc3RyaW5nIHRoYXQgd291bGQgYmUg
dXNlZCBhcyBpdHMgYXJndW1lbnQuICBPbmx5IGFmZmVjdHMgdGhlCitjYXNlIG9mIGFzeW5j
aHJvbm91cyBwcm9jZXNzIHdpdGggdGhlIGRlZmF1bHQgZmlsdGVyLiAgKi8pOworICByZWFk
X3Byb2Nlc3Nfb3V0cHV0X2Zhc3QgPSBRdDsKKwogICBERUZWQVJfSU5UICgicHJvY2Vzcy1l
cnJvci1wYXVzZS10aW1lIiwgcHJvY2Vzc19lcnJvcl9wYXVzZV90aW1lLAogCSAgICAgIGRv
YzogLyogVGhlIG51bWJlciBvZiBzZWNvbmRzIHRvIHBhdXNlIGFmdGVyIGhhbmRsaW5nIHBy
b2Nlc3MgZXJyb3JzLgogVGhpcyBpc24ndCB1c2VkIGZvciBhbGwgcHJvY2Vzcy1yZWxhdGVk
IGVycm9ycywgYnV0IGlzIHVzZWQgd2hlbiBhCi0tIAoyLjM3LjIKCg==
--------------DyANkJr4Sjysej9e6FAKU5xu
Content-Type: text/x-patch; charset=UTF-8;
 name="0002-Remember-the-value-of-read_process_output_max-when-a.patch"
Content-Disposition: attachment;
 filename*0="0002-Remember-the-value-of-read_process_output_max-when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aW11bSBudW1iZXIgb2YgYnl0ZXMgdG8gcmVhZCBpbiBhIHNpbmdsZSBjaHVuay4gKi8K
KyAgICBwdHJkaWZmX3QgcmVhZG1heDsKICAgICAvKiBUcnVlIG1lYW5zIGtpbGwgc2lsZW50
bHkgaWYgRW1hY3MgaXMgZXhpdGVkLgogICAgICAgIFRoaXMgaXMgdGhlIGludmVyc2Ugb2Yg
dGhlIGBxdWVyeS1vbi1leGl0JyBmbGFnLiAgKi8KICAgICBib29sX2JmIGtpbGxfd2l0aG91
dF9xdWVyeSA6IDE7Ci0tIAoyLjM3LjIKCg==
--------------DyANkJr4Sjysej9e6FAKU5xu
Content-Type: text/x-patch; charset=UTF-8;
 name="0003-Dynamically-increase-the-readmax-if-the-pipe-has-mor.patch"
Content-Disposition: attachment;
 filename*0="0003-Dynamically-increase-the-readmax-if-the-pipe-has-mor.pa";
 filename*1="tch"
Content-Transfer-Encoding: base64

RnJvbSBjMTMwMDM5N2Y4NmEzOTdhZTM4YWQwODEyNmRjOGUwMjEwNjdmMTI4IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBEbWl0cnkgR3V0b3YgPGRtaXRyeUBndXRvdi5kZXY+
CkRhdGU6IFN1biwgMjQgU2VwIDIwMjMgMDE6Mjk6MTggKzAzMDAKU3ViamVjdDogW1BBVENI
IDMvM10gRHluYW1pY2FsbHkgaW5jcmVhc2UgdGhlIHJlYWRtYXggaWYgdGhlIHBpcGUgaGFz
IG1vcmUKIGF2YWlsYWJsZQoKKiBzcmMvcHJvY2Vzcy5jIChyZWFkX3Byb2Nlc3Nfb3V0cHV0
KTogRHluYW1pY2FsbHkgaW5jcmVhc2UgdGhlCmJ1ZmZlciBzaXplIGRlcGVuZGluZyBvbiB0
aGUgcGlwZSdzIGJ1ZmZlcmVkIGNvbnRlbnRzIChidWcjNjYwMjApLgotLS0KIHNyYy9wcm9j
ZXNzLmMgfCAxMSArKysrKysrKysrKwogMSBmaWxlIGNoYW5nZWQsIDExIGluc2VydGlvbnMo
KykKCmRpZmYgLS1naXQgYS9zcmMvcHJvY2Vzcy5jIGIvc3JjL3Byb2Nlc3MuYwppbmRleCBk
N2FlZGNkZjEyZC4uMTNjZjZkNmM1MGQgMTAwNjQ0Ci0tLSBhL3NyYy9wcm9jZXNzLmMKKysr
IGIvc3JjL3Byb2Nlc3MuYwpAQCAtNjE0Niw2ICs2MTQ2LDE3IEBAIHJlYWRfcHJvY2Vzc19v
dXRwdXQgKExpc3BfT2JqZWN0IHByb2MsIGludCBjaGFubmVsKQogICBMaXNwX09iamVjdCBv
ZGVhY3RpdmF0ZTsKICAgY2hhciAqY2hhcnM7CiAKKyNpZmRlZiBVU0FCTEVfRklPTlJFQUQK
KyNpZmRlZiBEQVRBR1JBTV9TT0NLRVRTCisgIGlmICghREFUQUdSQU1fQ0hBTl9QIChjaGFu
bmVsKSkKKyNlbmRpZgorICAgIHsKKyAgICAgIGludCBhdmFpbGFibGVfcmVhZDsKKyAgICAg
IGlvY3RsIChwLT5pbmZkLCBGSU9OUkVBRCwgJmF2YWlsYWJsZV9yZWFkKTsKKyAgICAgIHJl
YWRtYXggPSBNQVggKHJlYWRtYXgsIGF2YWlsYWJsZV9yZWFkKTsKKyAgICB9CisjZW5kaWYK
KwogICBVU0VfU0FGRV9BTExPQ0E7CiAgIGNoYXJzID0gU0FGRV9BTExPQ0EgKHNpemVvZiBj
b2RpbmctPmNhcnJ5b3ZlciArIHJlYWRtYXgpOwogCi0tIAoyLjM3LjIKCg==

--------------DyANkJr4Sjysej9e6FAKU5xu--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 23 Sep 2023 21:51:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 23 17:51:54 2023
Received: from localhost ([127.0.0.1]:40708 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qkAXZ-0006jA-SI
	for submit <at> debbugs.gnu.org; Sat, 23 Sep 2023 17:51:54 -0400
Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:60373)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qkAXW-0006iv-KN
 for 66020 <at> debbugs.gnu.org; Sat, 23 Sep 2023 17:51:52 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id 1BBBF3200708;
 Sat, 23 Sep 2023 17:51:33 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Sat, 23 Sep 2023 17:51:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm1; t=
 1695505892; x=1695592292; bh=lU2PwP/nCbNrGF9LADRreHQ6651kwnKlFlG
 HmvnQAKU=; b=F0MM96mM5+hglEDZml84m5bK7mbtivfmA5Cv8RWFMp8pvj4qlUL
 IK1KVbVU3I3G0bqKcL9W4jG/sH3av+4/3prVLu0ceRJTl/BZVHVeX2jPlCg9ROVB
 EWuKAz8MGfak+AIhtmF9htMSdqZnu+Mdxpf2YAhUajUeHP00/z4/Sb/rAJ5Lrsa7
 xrzoF40fTurqAWR/L8tJ4kbo1D0ip0uO0+wU7xw0CFmvexLbbqg9FlE35MmBRxL6
 zeIhLaozN0Ygtd8Z3rkJ4WFscQos0tf6DTJNPyUbz524RZOHIkAfhCDxhESoZ2YW
 UDMMyAxmyZ+uxM/pH8eGYUJfU/X5XUTPCvQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1695505892; x=1695592292; bh=lU2PwP/nCbNrGF9LADRreHQ6651kwnKlFlG
 HmvnQAKU=; b=IP/vPYrNJr777BjwMguIsdSy8cK84ZpbtGWH7YEntN6+q6LAoPA
 i/bHpzSLmF2ri6IIXDHX1CXIxLbKavkFjrsFyNQX4q6cdI4hWpx+v5af+T4GNmuB
 9M47WTWShsdnrf4IgfIJWopvvdMWC/7bBOOg///fF7Tul7DdU2qNvyYq3A8qG3xu
 1l3cCV0pqcVQHruo/BzVaqFDzqsw//LDXt1gZvQTGb6+QcwjVhvqkt6Z0523l27K
 pE4jwWMWnH608B3/KpfkQmaP9lSuYSXSqwRgJtRiTsu12OGmBzt4aYI/VGsCAgMM
 Gm9S+mrex7XuV6l2B03jmvk4EnVgJS8Takw==
X-ME-Sender: <xms:5F0PZQO5KM92s6Uegxvnl9Sa8-XD5WmRpKYUGeDR_pz-GiYzWhAImw>
 <xme:5F0PZW-USTvAfTwoguYChA0xZdZZ96Czrihz6u-3q5iSha1XqPneHn4cBZkK7ECdG
 FBlp1iOkriSDdBv0I8>
X-ME-Received: <xmr:5F0PZXRFZGnZz3tazMjf3POfm3wtw_4jTUdNSoMl7PZYPHxnGlJFmKWonEZhB60>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeluddgtdegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffhvfevfhgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepteehheekteegfeeufffgtdetvdduledvjeejffeikeevleevffffiefgueej
 keelnecuffhomhgrihhnpehsthgrtghkvgigtghhrghnghgvrdgtohhmnecuvehluhhsth
 gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhht
 ohhvrdguvghv
X-ME-Proxy: <xmx:5F0PZYs269kTbmLfuYrR3KmtL93GQjRCFwgVlZ5VSiX1FW9e_jwYhw>
 <xmx:5F0PZYffjip-lxddDZK8yTTphZlz6BuEu1VNHlpXomfE3YXrHhDFGg>
 <xmx:5F0PZc0SAx8Oq9_tESb6Y5EhAvAXkjDmwVnG1B9yVdMnib3ejiwB0w>
 <xmx:5F0PZZq2jR3SyhBdfBuc_MvN_4tC6uZ9mHL01Uzs6snREclax6hrIQ>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 23 Sep 2023 17:51:31 -0400 (EDT)
Message-ID: <b40cd15f-1b53-1016-c616-c016a903069e@HIDDEN>
Date: Sun, 24 Sep 2023 00:51:28 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN> <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN>
 <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN>
 <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN>
 <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN>
 <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
 <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
In-Reply-To: <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 66020
Cc: stefankangas@HIDDEN, 66020 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.2 (---)

On 21/09/2023 20:33, Dmitry Gutov wrote:
> On 21/09/2023 17:37, Dmitry Gutov wrote:
>> We could look into improving that part specifically: for example, 
>> reading from the process multiple times into 'chars' right away while 
>> there is still pending output present (either looping inside 
>> read_process_output, or calling it in a loop in 
>> wait_reading_process_output, at least until the process' buffered 
>> output is exhausted). That could reduce reactivity, however (can we 
>> find out how much is already buffered in advance, and only loop until 
>> we exhaust that length?)
> 
> Hmm, the naive patch below offers some improvement for the value 4096, 
> but still not comparable to raising the buffer size: 0.76 -> 0.72.
> 
> diff --git a/src/process.c b/src/process.c
> index 2376d0f288d..a550e223f78 100644
> --- a/src/process.c
> +++ b/src/process.c
> @@ -5893,7 +5893,7 @@ wait_reading_process_output (intmax_t time_limit, 
> int nsecs, int read_kbd,
>             && ((fd_callback_info[channel].flags & (KEYBOARD_FD | 
> PROCESS_FD))
>             == PROCESS_FD))
>           {
> -          int nread;
> +          int nread = 0, nnread;
> 
>             /* If waiting for this channel, arrange to return as
>            soon as no more input to be processed.  No more
> @@ -5912,7 +5912,13 @@ wait_reading_process_output (intmax_t time_limit, 
> int nsecs, int read_kbd,
>             /* Read data from the process, starting with our
>            buffered-ahead character if we have one.  */
> 
> -          nread = read_process_output (proc, channel);
> +          do
> +        {
> +          nnread = read_process_output (proc, channel);
> +          nread += nnread;
> +        }
> +          while (nnread >= 4096);
> +
>             if ((!wait_proc || wait_proc == XPROCESS (proc))
>             && got_some_output < nread)
>           got_some_output = nread;
> 
> 
> And "unlocking" the pipe size on the external process takes the 
> performance further up a notch (by default it's much larger): 0.72 -> 0.65.
> 
> diff --git a/src/process.c b/src/process.c
> index 2376d0f288d..85fc1b4d0c8 100644
> --- a/src/process.c
> +++ b/src/process.c
> @@ -2206,10 +2206,10 @@ create_process (Lisp_Object process, char 
> **new_argv, Lisp_Object current_dir)
>         inchannel = p->open_fd[READ_FROM_SUBPROCESS];
>         forkout = p->open_fd[SUBPROCESS_STDOUT];
> 
> -#if (defined (GNU_LINUX) || defined __ANDROID__)    \
> -  && defined (F_SETPIPE_SZ)
> -      fcntl (inchannel, F_SETPIPE_SZ, read_process_output_max);
> -#endif /* (GNU_LINUX || __ANDROID__) && F_SETPIPE_SZ */
> +/* #if (defined (GNU_LINUX) || defined __ANDROID__)    \ */
> +/*   && defined (F_SETPIPE_SZ) */
> +/*       fcntl (inchannel, F_SETPIPE_SZ, read_process_output_max); */
> +/* #endif /\* (GNU_LINUX || __ANDROID__) && F_SETPIPE_SZ *\/ */
>       }
> 
>     if (!NILP (p->stderrproc))
> 
> Apparently the patch from bug#55737 also made things a little worse by 
> default, by limiting concurrency (the external process has to wait while 
> the pipe is blocked, and by default Linux's pipe is larger). Just 
> commenting it out makes performance a little better as well, though not 
> as much as the two patches together.
> 
> Note that both changes above are just PoC (e.g. the hardcoded 4096, and 
> probably other details like carryover).
> 
> I've tried to make a more nuanced loop inside read_process_output 
> instead (as replacement for the first patch above), and so far it 
> performs worse that the baseline. If anyone can see when I'm doing wrong 
> (see attachment), comments are very welcome.

This seems to have been a dead end: while looping does indeed make 
things faster, it doesn't really fit the approach of the 
'adaptive_read_buffering' part that's implemented in read_process_output.

And if the external process is crazy fast (while we, e.g. when using a 
Lisp filter, are not so fast), the result could be much reduced 
interactivity, with this one process keeping us stuck in the loop.

But it seems I've found an answer to one previous question: "can we find 
out how much is already buffered in advance?"

The patch below asks that from the OS (how portable is this? not sure) 
and allocates a larger buffer when more output has been buffered. If we 
keep OS's default value of pipe buffer size (64K on Linux and 16K-ish on 
macOS, according to 
https://unix.stackexchange.com/questions/11946/how-big-is-the-pipe-buffer), 
that means auto-scaling the buffer on Emacs's side depending on how much 
the process outputs. The effect on performance is similar to the 
previous (looping) patch (0.70 -> 0.65), and is comparable to bumping 
read-process-output-max to 65536.

So if we do decide to bump the default, I suppose the below should not 
be necessary. And I don't know whether we should be concerned about 
fragmentation: this way buffers do get allocates in different sizes 
(almost always multiples of 4096, but with rare exceptions among larger 
values).

diff --git a/src/process.c b/src/process.c
index 2376d0f288d..13cf6d6c50d 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6137,7 +6145,18 @@
    specpdl_ref count = SPECPDL_INDEX ();
    Lisp_Object odeactivate;
    char *chars;

+#ifdef USABLE_FIONREAD
+#ifdef DATAGRAM_SOCKETS
+  if (!DATAGRAM_CHAN_P (channel))
+#endif
+    {
+      int available_read;
+      ioctl (p->infd, FIONREAD, &available_read);
+      readmax = MAX (readmax, available_read);
+    }
+#endif
+
    USE_SAFE_ALLOCA;
    chars = SAFE_ALLOCA (sizeof coding->carryover + readmax);

What do people think?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 18:49:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 14:49:11 2023
Received: from localhost ([127.0.0.1]:34811 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjOjf-0005jO-1k
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 14:49:11 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55886)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qjOjc-0005j9-BA
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 14:49:09 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qjOjM-0005Ex-Gg; Thu, 21 Sep 2023 14:48:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=v4jg5SRZst/tjDO73eEGCFg06m838ZphuBEr9fYBzUY=; b=e5TGVBGYTnzW
 ws99cAriCyxMx8+W9BT58XfTgfciwGnYmu/rCcAqDMixNQmEwzF9v4YnXk6vEQ5avKElQywoy29Oq
 SouiqrWGS7ZBXyW4myY1GGsrrQGcIc4Y+yQjslz+yaTWaLZhwTf6dB3XX+WV7oME0rNq7YLuY747q
 JCua/eDn68mlYk20obiHpn6Y7W/4BCFBWsnv4iD8Af7DFrrk8rMAtbNjfAokIGkBV8gIK04+N53SM
 auSSMCiYh3LpHMqkGAT7lKVYU1SSqAM+/0avbbUXdr+FZvrxaizrK3c/ODmnL4y74oiJk5UdMPNCv
 VfFD5kot9XBulGM5mIe1Mg==;
Date: Thu, 21 Sep 2023 21:49:00 +0300
Message-Id: <83edir8iqr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <d04b0f34-591f-9b17-a284-732edbdb5578@HIDDEN> (message from
 Dmitry Gutov on Thu, 21 Sep 2023 21:42:01 +0300)
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN> <83msxf8td3.fsf@HIDDEN>
 <4dd10ea8-6124-a50d-2bc2-1fced50e34cc@HIDDEN> <83h6nn8j6h.fsf@HIDDEN> 
 <d04b0f34-591f-9b17-a284-732edbdb5578@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, stefankangas@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 21 Sep 2023 21:42:01 +0300
> Cc: stefankangas@HIDDEN, monnier@HIDDEN, 66020 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> On 21/09/2023 21:39, Eli Zaretskii wrote:
> >> Date: Thu, 21 Sep 2023 20:40:35 +0300
> >> Cc:stefankangas@HIDDEN,monnier@HIDDEN,66020 <at> debbugs.gnu.org
> >> From: Dmitry Gutov<dmitry@HIDDEN>
> >>
> >> Can we get the "recorded" value back from the pipe somehow?
> > There's F_GETPIPE_SZ command to fcntl, so I think we can.
> 
> I'll rephrase: is this a good idea (doing a +1 syscall every time we 
> read a chunk, I'm not sure of its performance anyway), or should we add 
> a new field to Lisp_Process after all?

If you indeed need the size, then do add it to the process object.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 18:42:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 14:42:27 2023
Received: from localhost ([127.0.0.1]:34805 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjOd9-0005So-4b
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 14:42:27 -0400
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:53245)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qjOd4-0005SY-4i
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 14:42:25 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.west.internal (Postfix) with ESMTP id 8833432007D7;
 Thu, 21 Sep 2023 14:42:05 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Thu, 21 Sep 2023 14:42:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm1; t=
 1695321725; x=1695408125; bh=P+rDt2VrIj2asnmjEEYCHgmU5hOP63BUQaS
 vRwhZi9w=; b=tTxbr4BRqLdi2UmmOacanxvkEe/+D/y0zkhODYxoH6hamw1nN26
 3VGnImM715DIM70BGhZ3nYzFCcDUE6pTTsqzC6t4WChNLMpOX2wo/a/4J05Np6V2
 8bOzSlzS6Bcal11xG1s7frihbzzol0Oiy905hmcL0sWUP8agipJXdkumPlQGHjoi
 Bfu/6UVH4rJpDQ0K1iZE1iQqaPzcfgGpMBfctYzUpmU7Yqhv7CYXYCp04HgAaXFR
 SpB/dfpBoJeJrCT0pTKLPMKrvIS753fM0MVy9wxVD6PBzyygCYhUkt0htaYsJxIk
 MI3SZ2dmwcV4/h+krAoWQhcE4S8Egu95WGw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1695321725; x=1695408125; bh=P+rDt2VrIj2asnmjEEYCHgmU5hOP63BUQaS
 vRwhZi9w=; b=dBxDiJci4phOQmm8uiTtBF9fNjUc2VKv9e0+hk230ebXHZGaJca
 lzGId5u4xbo+zWEcbAp7/dfn8F5zWNIYU1Uo01yUynTH7+vr2XV4epOR7YMVFJCw
 PyRgw1zB9PIO8d7ZZE6Wr7499GmjQGSqUg9xFBF0j94uRvD3zCExDaG3NQ62rrIw
 eRNKFJZirToeJouN0KDLiuLBseBDSEHbSnijkwYofZXq52jS5bZqnX2lNisuq7w6
 Vk9NFhTRn7rqLFqNnjI0j8iEC4NNeo3rhMCOn3StfEJoRRxSJxdv9cEPui3LEDdt
 NYuVqbVesqTSzp2g3iIoZ584nLilcv22K8w==
X-ME-Sender: <xms:fI4MZc4VUkXg7gIrkt49ySOVe9-A3ZD4iJHNkdkM25fzAAHyYoL3yg>
 <xme:fI4MZd54aEnLrNXTfOmmZAnDezXgexaxFLE-P2aDLTzOiRvr64EaQNQOwmlPGgdbx
 7ridm9mWETqPb6htQ8>
X-ME-Received: <xmr:fI4MZbdCGwajPEt7F-BwslBqHpZipUhSJrbZ7m6WsNGGXSOhwU-G8vuu7g3bWdU>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekiedguddvjecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev
 ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 gumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:fI4MZRI-I49zqD05b47pw7d6MC6UkGHG23_nheyqdyuBmtAc3bgHbA>
 <xmx:fI4MZQJeoaxpP0-xQeuy8XD20M30gdi1tRrKc5wM-Q3TDcmiNPDiAw>
 <xmx:fI4MZSxv6WF_IJDTzULvU4m8pi_MHRWkqoYWFGwhaMVXpGdgeTUdEA>
 <xmx:fY4MZXVpRQsVDHTxvNRlhH0l9FJIpKyfFlmHYKqIXTENWOQLNwCTxg>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 21 Sep 2023 14:42:03 -0400 (EDT)
Message-ID: <d04b0f34-591f-9b17-a284-732edbdb5578@HIDDEN>
Date: Thu, 21 Sep 2023 21:42:01 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN> <83msxf8td3.fsf@HIDDEN>
 <4dd10ea8-6124-a50d-2bc2-1fced50e34cc@HIDDEN> <83h6nn8j6h.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <83h6nn8j6h.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, stefankangas@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.2 (---)

On 21/09/2023 21:39, Eli Zaretskii wrote:
>> Date: Thu, 21 Sep 2023 20:40:35 +0300
>> Cc:stefankangas@HIDDEN,monnier@HIDDEN,66020 <at> debbugs.gnu.org
>> From: Dmitry Gutov<dmitry@HIDDEN>
>>
>> Can we get the "recorded" value back from the pipe somehow?
> There's F_GETPIPE_SZ command to fcntl, so I think we can.

I'll rephrase: is this a good idea (doing a +1 syscall every time we 
read a chunk, I'm not sure of its performance anyway), or should we add 
a new field to Lisp_Process after all?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 18:39:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 14:39:43 2023
Received: from localhost ([127.0.0.1]:34800 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjOaV-0005OS-IR
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 14:39:43 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39494)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qjOaU-0005OD-6s
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 14:39:42 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qjOaE-0003LA-JH; Thu, 21 Sep 2023 14:39:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=NfRc+JfVW2mG341m4CoblLYVZAHK2mHyk/gMnAiKaEg=; b=B1nfqNjJMx0G
 kUZGxd44jotVfq6BfOrqvJiXzkPge722IpcMU+/ZbYy9RuxyvsIYsm6HokdntaYZi46OepgMJA8bE
 J0ZzacbMoqGfuPblS1Bq83xAqgy0+CjyWjnjGglxmPUN8a2AA4WQkpqMy5nokerm5mZ+YylCiiCdW
 920760cCkIWWEJe8vmEgR7USSxf3SvFEOMVIeoLCAyMwz8FY+uMbE+n11oHy+V0enS61fzvpRfigH
 MdmUOayCHhM01phwEUyvakKPhYV1oy6/T45DWv9rEDyXVsWzOv6vH+YjeW5FjMAMcDBm7QF1EoGKW
 zoT0Mw2QeI80TCfisvLSNA==;
Date: Thu, 21 Sep 2023 21:39:34 +0300
Message-Id: <83h6nn8j6h.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <4dd10ea8-6124-a50d-2bc2-1fced50e34cc@HIDDEN> (message from
 Dmitry Gutov on Thu, 21 Sep 2023 20:40:35 +0300)
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN> <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN> <83msxf8td3.fsf@HIDDEN>
 <4dd10ea8-6124-a50d-2bc2-1fced50e34cc@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, stefankangas@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 21 Sep 2023 20:40:35 +0300
> Cc: stefankangas@HIDDEN, monnier@HIDDEN, 66020 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> Can we get the "recorded" value back from the pipe somehow?

There's F_GETPIPE_SZ command to fcntl, so I think we can.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 17:54:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 13:54:53 2023
Received: from localhost ([127.0.0.1]:34783 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjNt6-0004Cu-NY
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 13:54:53 -0400
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:45323)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qjNt2-0004Cc-BL
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 13:54:51 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id 1469D5C01C8;
 Thu, 21 Sep 2023 13:54:33 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Thu, 21 Sep 2023 13:54:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm1; t=
 1695318873; x=1695405273; bh=q1B7TLI6SOwqcxTBfNXZje7JR5MuPKu9Rsq
 YHLY9Bow=; b=Gjyf+JcEN2jtTsyOQwAJd984QkCTXjQYvs/g80wrB4fSio67C2C
 XI9p2fU7c+4NAoX9NVoyjmKfjglAyt2DqiTpsWrPjzrPjX4iu+iSEaeQEu7IHcbf
 yKJZEcgmJ80g8TWYIWKXyb9ydKl/GeeQSk382ZgjgleQZj3XHBJiXcZL8Fogz1yJ
 mCBLiyy36ud5GYQlxgVnRR+WMXCHFq6eHjeT42dup7K5SYyP7fxEp+yvDyaiMgTu
 Sfb56hk4nzJO4T1OWR/8d6H+vRrXyCzYzhvcZDlLrL4+rJ7VejLEfu8BpLtynSzN
 NGCWxFCTqcEyZXd/KI+J6CrwUdSBFYh6CIQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1695318873; x=1695405273; bh=q1B7TLI6SOwqcxTBfNXZje7JR5MuPKu9Rsq
 YHLY9Bow=; b=AfMxk7UTLymPFy1xqGzx6Lsr7R1+JG1NeyDcKqyepTLpVMwxoqZ
 N81RVu0r99x0OSmR3JS8wWk3xJZCe3QY0J4PALnvSPF+b7iexVnVxyppO3ENQHMK
 P6+oHEW0GFX/Vr0MtlwBXzcI1Saj6mJvlVcKdOmvX+rz+YcC0GhvePG8tmqFRTZf
 nlwvJVzHdEvABTlG8xByErWGWmeUDQGqHHFSg2LTmwrNooVzzP/Q6uwtZc7o9YLD
 RcaXd505Nm8BGGZ8zWlqNtV0gDyLk3FYSGmewMsNcCsLRgCqzdUbu2R3BN2Gjl55
 PNM+RcgAwK+OhjFI26wqyi9+DFN57Nnsstw==
X-ME-Sender: <xms:WIMMZaL8p66mPTeiOJtCb2wSIYTZwuooQ9bE2xp4H1Uiq7NJhah7ZA>
 <xme:WIMMZSI5zvNe87GA-b7RoHQwo-_OVNlPwgSIt4_4DrtCMC5dRqYwPT8B26eBPhp6V
 EjxFkiK_O26iTllxos>
X-ME-Received: <xmr:WIMMZas32zRL5g5rUK1vv-yc9BKLqbVpDHOf6TSwu2xwedV2xXO_dOUW-Vgs2Ic>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekiedguddukecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpefhuedtkeevgeegteetkeefjeffgeduudduhfeuveelfedtffffgeegiedv
 vdejleenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtne
 curfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:WIMMZfbB4VUdr1ztoVhgelk538mpH-4IRxvn15kLHejlxMkonztxxg>
 <xmx:WIMMZRZebsTErjtrBkwwk1bXFabN4rabZIQTVfT26BAgS9VGUTEzsw>
 <xmx:WIMMZbBvtBytYKMTT_7fqeTvksDU9kdbDEYwI-xYVoOzye-OWWc85Q>
 <xmx:WYMMZQnYot6u_0ig_6b8d4j5nHR5i3ip8Iy8IVJJwxMTHAC7xT003g>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 21 Sep 2023 13:54:31 -0400 (EDT)
Message-ID: <83f3d122-f11a-d0b7-60c6-9b0c4812cd4d@HIDDEN>
Date: Thu, 21 Sep 2023 20:54:30 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <jwvr0msl0ir.fsf-monnier+emacs@HIDDEN>
 <58e9135f-915d-beb9-518a-e814ec2a0c5b@HIDDEN> <834jjnacpc.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <834jjnacpc.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, monnier@HIDDEN, stefankangas@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.2 (---)

On 21/09/2023 16:16, Eli Zaretskii wrote:
>> Date: Thu, 21 Sep 2023 15:20:57 +0300
>> Cc: Eli Zaretskii<eliz@HIDDEN>, Stefan Kangas<stefankangas@HIDDEN>,
>>   66020 <at> debbugs.gnu.org
>> From: Dmitry Gutov<dmitry@HIDDEN>
>>
>> On 21/09/2023 05:36, Stefan Monnier wrote:
>>>> make_process), although I had to use a value produced by make_uninit_string:
>>>> apparently simply storing a char* field inside a managed structure creates
>>>> problems for the GC and early segfaults. Anyway, the result was slightly
>>> That should depend on*where*  you put that field.  Basically, it has to
>>> come after:
>>>
>>>       /* The thread a process is linked to, or nil for any thread.  */
>>>       Lisp_Object thread;
>>>       /* After this point, there are no Lisp_Objects.  */
>>>
>>> since all the words up to that point will be traced by the GC (and
>>> assumed to be Lisp_Object fields).
>> Ah, thanks. That calls for another try.
>>
>> ...still no improvement, though no statistically significant slowdown
>> either this time.
> Why did you expect a significant improvement?

No need to be surprised, I'm still growing intuition for what is fast 
and what is slow at this level of abstraction.

> Allocating and freeing
> the same-size buffer in quick succession has got to be optimally
> handled by modern malloc implementations, so I wouldn't be surprised
> by what you discover.  There should be no OS calls, just reuse of a
> buffer that was just recently free'd.  The overhead exists, but is
> probably very small, so it is lost in the noise.

There are context switches after 'read_process_output' exits (control is 
returned to Emacs's event loop, the external process runs again, we wait 
on it with 'select'), it might not be there later, especially outside of 
the lab situation where we benchmark just single external process. So I 
don't know.

I'm not majorly concerned, of course, and wouldn't be at all, if not for 
the previously recorded minor degragation with larger buffers in the 
longer-running session (last table in https://debbugs.gnu.org/66020#10).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 17:40:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 13:40:57 2023
Received: from localhost ([127.0.0.1]:34771 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjNfc-0003mI-I3
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 13:40:57 -0400
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:48957)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qjNfZ-0003m4-Nb
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 13:40:54 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id 7295B5C0083;
 Thu, 21 Sep 2023 13:40:38 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Thu, 21 Sep 2023 13:40:38 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm1; t=
 1695318038; x=1695404438; bh=BCbwPkLFW24nXas7752ku61z+VT8UPOlKLv
 ohBTMUgs=; b=IaFWWAFTN+AkYAvWylBs0GyE3LtOEQQz6XjJoEN0lQiJz4JoQEU
 qn21u96oODeSZmmxy+a9/vrfCXAxdEi4O4GAlhz6hOcyv8m9AGqYm4xueQ9hWrnm
 BbZwYt6YcUj0zhc4KWkA2nANb1ETLAY/mfaKjDfyST45gB4xNlmLIAvRp+KFJqzB
 9juq2l6ogMLl05Pn9Zz4MPMbzU8saXZv8GGidk3/NCbTattpDOlcL0jjlBQ7krCx
 JDWElGwh9gdCcC1+vWKbqmjKlJ6P2krMPZS4LVxoon2NdNtrV3JTH4ImipNQqmin
 Vh/KE6auLA0UZdp3skmbsoqI8ZryHNU0mnw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1695318038; x=1695404438; bh=BCbwPkLFW24nXas7752ku61z+VT8UPOlKLv
 ohBTMUgs=; b=jSSWvIXkkxGhHM9LUFcKYsglhUaK9tTnzxEadwqbcqAKp7ZGz2o
 v2pDaKWNPgZVXAuksS089+oUJqZYHG0BUKIsRa5kCiI3Ks3Qe+NeErIQaal5Kexm
 PHDSuSPG051opUgvv8uSkrmj6eJsUiC1GWBSNQ2q2nVbrnDL5+YOFyAED6fM56hd
 +2KWYdyPpTa3MLPrqR+dA8lK98dFFqeY6AaldJL8DwFEHTImhrNYdnHVtcYvs3Rf
 2YnIzF3QKcsvhXWT1rJRG76I08A5GNbyLxWfwViRvjjBRij24HZ6+lyGgYiM1dEX
 ZHGQsZ8pQvUTDAMIIV1p/y+7r588UC6OlEw==
X-ME-Sender: <xms:FYAMZVDiid38QxkvxOCc6cav2rD9cmimwN2cvX5g6mmB_IBW5UxftA>
 <xme:FYAMZThYv37LCnwkQjU5n17YO0P_H0yDAgYKCmFqqtdqYYeaEdmIEhHh6NpSxEjZa
 gNhfK1vlzTCVY1INj4>
X-ME-Received: <xmr:FYAMZQk4u7uloNGRDkBHsK8mWBZa50SIzf1mVaOhoW7Jt0NLiAkEDBTYZYnZuNg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekiedgudduhecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev
 ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 gumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:FYAMZfxdPt5I-Ng4_-bHOXPvm_XHZu2Lusd0FOInm-k48Vyzg5Iptw>
 <xmx:FYAMZaQwkhHAwatXWG_4qSwuqO3l1VWOielrqkSesM-DmaAauef2Kg>
 <xmx:FYAMZSaqCGNs-jgiwBuVmyeQQ8RWM9TMuz3rM9cLJr2qm_xEDvhGBw>
 <xmx:FoAMZVcujbBiwJmhUs29o2MnzJjf1IHiycHwksFaldn6MT3-Ls-uCQ>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 21 Sep 2023 13:40:36 -0400 (EDT)
Message-ID: <4dd10ea8-6124-a50d-2bc2-1fced50e34cc@HIDDEN>
Date: Thu, 21 Sep 2023 20:40:35 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN> <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN> <83msxf8td3.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <83msxf8td3.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -1.5 (-)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, stefankangas@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.2 (---)

On 21/09/2023 17:59, Eli Zaretskii wrote:
>> Date: Thu, 21 Sep 2023 17:37:23 +0300
>> Cc: stefankangas@HIDDEN, monnier@HIDDEN, 66020 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dmitry@HIDDEN>
>>
>>> How does the throughput depend on this value?  If the dependence curve
>>> plateaus at some lower value, we could use that lower value as a
>>> "good-enough" default.
>>
>> Depends on what we're prepared to call a plateau. Strictly speaking, not
>> really. But we have a "sweet spot": for the process in my original
>> benchmark ('find' with lots of output) it seems to be around 1009600.
>> Here's a table (numbers are different from before because they're
>> results of (benchmark 5 ...) divided by 5, meaning GC is amortized:
>>
>> |    4096 | 0.78 |
>> |   16368 | 0.69 |
>> |   40960 | 0.65 |
>> |  409600 | 0.59 |
>> | 1009600 | 0.56 |
>> | 2009600 | 0.64 |
>> | 4009600 | 0.65 |
> 
> Not enough data points between 40960 and 409600, IMO.  40960 sounds
> like a good spot for the default value.

Or 32K, from the thread linked to previously (datagram size). And ifwe 
were to raise MAX_ALLOCA by 2x, we could still use 'alloca'.

Neither would be optimal for my test scenario, though still an 
improvement. But see my other email with experimental patches, those 
bear improvement with the default 4096.

>>>> And I think we should make the process "remember" the value at its
>>>> creation either way (something touched on in bug#38561): in bug#55737 we
>>>> added an fcntl call to make the larger values take effect. But this call
>>>> is in create_process: so any subsequent increase to a large value of
>>>> this var won't have effect.
>>>
>>> Why would the variable change after create_process?  I'm afraid I
>>> don't understand what issue you are trying to deal with here.
>>
>> Well, what could we lose by saving the value of read-process-output-max
>> in create_process?
> 
> It's already recorded in the size of the pipe, so why would we need to
> record it once more?

'read_process_output' looks it up once more, to set the value of 
'readmax' and allocate char*chars.

Can we get the "recorded" value back from the pipe somehow?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 17:33:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 13:33:53 2023
Received: from localhost ([127.0.0.1]:34764 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjNYm-0003bR-GW
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 13:33:52 -0400
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:57821)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qjNYk-0003b9-5n
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 13:33:51 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id 686125C0ABC;
 Thu, 21 Sep 2023 13:33:33 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Thu, 21 Sep 2023 13:33:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-type:content-type:date:date:from:from:in-reply-to
 :in-reply-to:message-id:mime-version:references:reply-to:sender
 :subject:subject:to:to; s=fm1; t=1695317613; x=1695404013; bh=DG
 nJ6hz40L8fhUpX2K1tJ1iJM4MSo4bd/bEkm/5yTfo=; b=2qsGKFrNuJPueZoAL/
 lqu0GOu3188LeapqqwbtJJIjBm2F7CdLPe47B4wT3sC5tEpvv212nfZAPm+tbtwG
 RAVx6d6IDFWlMSyCSUYxQU398tBB972eoWXl/h5fkBh7tS3Rou4C34F6KGPRX9Up
 ZWgSuJ7juuY7+PnyUPoaxoJZW+G+WbUQiR94qYusfFV1EPHo8p6TRh0AqB2vvpQT
 5YIwajPiJ3fqaVUDkQMmTyoEHXqOq6ZPCVPGxBBtBfTK8SrosnVrYuNRyq7fRA8v
 IsGUJKZ3YsNSb7nJJvigm5gGWw4sZOHzDFRRrHh2QJt0JbqNdaN3saKoRPbwLlOC
 y7CA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:sender:subject
 :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm2; t=1695317613; x=1695404013; bh=DGnJ6hz40L8fh
 UpX2K1tJ1iJM4MSo4bd/bEkm/5yTfo=; b=PiCbwzr7t8o9CLwtl6PrpGPnkuXOx
 Xk5TorRCQRcJXbr3LgVD83ib24Z7d8hS+J3sMe7NOCVwGRLdm/VowEGLEItBq4J4
 0ySij+rfUcr0ZlWm7oLvo9TTOU5r6E6SdOfrhaKVSVQYym/P73HexAo4qqwIAhxZ
 5Z08AtnsH8gedWkzi2t1FqBIfB7cu/v99do8Dg02Yi3pO4GmF0wJT/2CJY+wMEln
 MM14IOQrDQaBmB3Zmn2QF83fBjRpMtbzepBhFIptpXK7pSRjwHlFxkWw0jMQq8Xz
 wbqHKl+IX12MFdmqzzK84QUK06GMNAczll3uBD/pexj+KOYH9G3ZjrjBA==
X-ME-Sender: <xms:bX4MZcEcYxWHvRkaFKEZNnmhTsAtITytro6SDxeKjFUe-rWGJC5bWg>
 <xme:bX4MZVXA6k6b7MJoMIie4PfhQnIivmtis5EAkaBvY49qCJId0WX7annERUKGLVYtH
 J0CSS73cYdBIqTKJ78>
X-ME-Received: <xmr:bX4MZWKafH6gtW4ODXksmRdbhcrVeVQg8DET_sBxq8287K2T9EDh_3HJ1bQD-yw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekiedguddufecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpegtkfffgggfuffhvfevfhgjsehmtderredtfeejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepieehgeektefggfehhfegieevuedugedvueetfffhtedtleelheekffelvddu
 tdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:bX4MZeEz_WBPc4nujk3LuoLNZ4ndeQbSHIpH7a11wjxOxwR2W2zZmQ>
 <xmx:bX4MZSUBG_bGcHUo5s5cMHVAhxtyb3sCS9Mh1jGGIutbCTI2_jp58Q>
 <xmx:bX4MZRNXibFM7X_Nx3qfqTetuN7t8IfMWkHxaLjbcNtlvi-JeTUQHg>
 <xmx:bX4MZfgtVWFzlZkzT0j75bcZO_Y4ULarGw_A7eteZp9t4agkxksohw>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 21 Sep 2023 13:33:31 -0400 (EDT)
Content-Type: multipart/mixed; boundary="------------X2wXDJQTrLHnoyaJptdb0Mbn"
Message-ID: <1d43341a-2e7c-9f1d-68e9-9bac6f4b5fba@HIDDEN>
Date: Thu, 21 Sep 2023 20:33:29 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: Re: bug#66020: (bug#64735 spin-off): regarding the default for
 read-process-output-max
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN>
 <18a0b4d8-32bd-3ecd-8db4-32608a1ebba7@HIDDEN>
 <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN>
 <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN>
 <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN>
 <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN>
 <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
In-Reply-To: <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, monnier@HIDDEN, stefankangas@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.2 (---)

This is a multi-part message in MIME format.
--------------X2wXDJQTrLHnoyaJptdb0Mbn
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 21/09/2023 17:37, Dmitry Gutov wrote:
> We could look into improving that part specifically: for example, 
> reading from the process multiple times into 'chars' right away while 
> there is still pending output present (either looping inside 
> read_process_output, or calling it in a loop in 
> wait_reading_process_output, at least until the process' buffered output 
> is exhausted). That could reduce reactivity, however (can we find out 
> how much is already buffered in advance, and only loop until we exhaust 
> that length?)

Hmm, the naive patch below offers some improvement for the value 4096, 
but still not comparable to raising the buffer size: 0.76 -> 0.72.

diff --git a/src/process.c b/src/process.c
index 2376d0f288d..a550e223f78 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5893,7 +5893,7 @@ wait_reading_process_output (intmax_t time_limit, 
int nsecs, int read_kbd,
  	      && ((fd_callback_info[channel].flags & (KEYBOARD_FD | PROCESS_FD))
  		  == PROCESS_FD))
  	    {
-	      int nread;
+	      int nread = 0, nnread;

  	      /* If waiting for this channel, arrange to return as
  		 soon as no more input to be processed.  No more
@@ -5912,7 +5912,13 @@ wait_reading_process_output (intmax_t time_limit, 
int nsecs, int read_kbd,
  	      /* Read data from the process, starting with our
  		 buffered-ahead character if we have one.  */

-	      nread = read_process_output (proc, channel);
+	      do
+		{
+		  nnread = read_process_output (proc, channel);
+		  nread += nnread;
+		}
+	      while (nnread >= 4096);
+
  	      if ((!wait_proc || wait_proc == XPROCESS (proc))
  		  && got_some_output < nread)
  		got_some_output = nread;


And "unlocking" the pipe size on the external process takes the 
performance further up a notch (by default it's much larger): 0.72 -> 0.65.

diff --git a/src/process.c b/src/process.c
index 2376d0f288d..85fc1b4d0c8 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2206,10 +2206,10 @@ create_process (Lisp_Object process, char 
**new_argv, Lisp_Object current_dir)
        inchannel = p->open_fd[READ_FROM_SUBPROCESS];
        forkout = p->open_fd[SUBPROCESS_STDOUT];

-#if (defined (GNU_LINUX) || defined __ANDROID__)	\
-  && defined (F_SETPIPE_SZ)
-      fcntl (inchannel, F_SETPIPE_SZ, read_process_output_max);
-#endif /* (GNU_LINUX || __ANDROID__) && F_SETPIPE_SZ */
+/* #if (defined (GNU_LINUX) || defined __ANDROID__)	\ */
+/*   && defined (F_SETPIPE_SZ) */
+/*       fcntl (inchannel, F_SETPIPE_SZ, read_process_output_max); */
+/* #endif /\* (GNU_LINUX || __ANDROID__) && F_SETPIPE_SZ *\/ */
      }

    if (!NILP (p->stderrproc))

Apparently the patch from bug#55737 also made things a little worse by 
default, by limiting concurrency (the external process has to wait while 
the pipe is blocked, and by default Linux's pipe is larger). Just 
commenting it out makes performance a little better as well, though not 
as much as the two patches together.

Note that both changes above are just PoC (e.g. the hardcoded 4096, and 
probably other details like carryover).

I've tried to make a more nuanced loop inside read_process_output 
instead (as replacement for the first patch above), and so far it 
performs worse that the baseline. If anyone can see when I'm doing wrong 
(see attachment), comments are very welcome.
--------------X2wXDJQTrLHnoyaJptdb0Mbn
Content-Type: text/x-patch; charset=UTF-8;
 name="read_process_output_nn_inside.diff"
Content-Disposition: attachment; filename="read_process_output_nn_inside.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL3NyYy9wcm9jZXNzLmMgYi9zcmMvcHJvY2Vzcy5jCmluZGV4IDIzNzZk
MGYyODhkLi45MWE1YzA0NGE4YyAxMDA2NDQKLS0tIGEvc3JjL3Byb2Nlc3MuYworKysgYi9z
cmMvcHJvY2Vzcy5jCkBAIC02MTI4LDExICs2MTMzLDExIEBAIHJlYWRfYW5kX2Rpc3Bvc2Vf
b2ZfcHJvY2Vzc19vdXRwdXQgKHN0cnVjdCBMaXNwX1Byb2Nlc3MgKnAsIGNoYXIgKmNoYXJz
LAogc3RhdGljIGludAogcmVhZF9wcm9jZXNzX291dHB1dCAoTGlzcF9PYmplY3QgcHJvYywg
aW50IGNoYW5uZWwpCiB7Ci0gIHNzaXplX3QgbmJ5dGVzOworICBzc2l6ZV90IG5ieXRlcywg
bm5ieXRlcyA9IDA7CiAgIHN0cnVjdCBMaXNwX1Byb2Nlc3MgKnAgPSBYUFJPQ0VTUyAocHJv
Yyk7CiAgIGVhc3NlcnQgKDAgPD0gY2hhbm5lbCAmJiBjaGFubmVsIDwgRkRfU0VUU0laRSk7
CiAgIHN0cnVjdCBjb2Rpbmdfc3lzdGVtICpjb2RpbmcgPSBwcm9jX2RlY29kZV9jb2Rpbmdf
c3lzdGVtW2NoYW5uZWxdOwotICBpbnQgY2Fycnlvdm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sKIAorICBubmJ5dGVzICs9IG5ieXRlczsKKyB9IHdoaWxlIChuYnl0ZXMg
Pj0gcmVhZG1heCk7CisKICAgU0FGRV9GUkVFX1VOQklORF9UTyAoY291bnQsIFFuaWwpOwot
ICByZXR1cm4gbmJ5dGVzOworICByZXR1cm4gbm5ieXRlczsKfQoK

--------------X2wXDJQTrLHnoyaJptdb0Mbn--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 14:59:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 10:59:50 2023
Received: from localhost ([127.0.0.1]:34632 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjL9i-0007hR-33
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 10:59:50 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57682)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qjL9f-0007h9-M8
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 10:59:48 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qjL9O-000337-BG; Thu, 21 Sep 2023 10:59:30 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=rSfwGjfpGCZpMB1Vt2IAruMLKEuwhJ3wI6RL8LVl8jE=; b=UWssMuD/MqfF
 +VbG34meYO5/H0TxgQZl8Jzo3UPOscdajcoJzfmgcHK0rd2LE1cKRe8EENg8H597+APyqc+6HM+1g
 WDVvSmMyDWO+wTONO6HpOdfg0Wb686YeS/zAhyS6qe24ApAcJUxARfkSWzgi1uaU75KtFvQHeTp4Q
 XlrM/JN5pE5F7BJNkRc/p8lno/Puu0aDc6hDv1LnTfzIrf3BDd0KsZfTwxgbY7JrTXB4lSLlJgmGn
 MAVBNnJNaQkHSIQTh4/DSbe2+8pOH8MNrtpBJnJt+oyJTvmFTk5mIo3UhPKQSGwkxeElwL+pNa1XH
 UhuPw480/eVbI8u5GgVNYg==;
Date: Thu, 21 Sep 2023 17:59:36 +0300
Message-Id: <83msxf8td3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN> (message from
 Dmitry Gutov on Thu, 21 Sep 2023 17:37:23 +0300)
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN> <83bkfs2tw5.fsf@HIDDEN>
 <18a0b4d8-32bd-3ecd-8db4-32608a1ebba7@HIDDEN> <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
 <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, stefankangas@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 21 Sep 2023 17:37:23 +0300
> Cc: stefankangas@HIDDEN, monnier@HIDDEN, 66020 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> > How does the throughput depend on this value?  If the dependence curve
> > plateaus at some lower value, we could use that lower value as a
> > "good-enough" default.
> 
> Depends on what we're prepared to call a plateau. Strictly speaking, not 
> really. But we have a "sweet spot": for the process in my original 
> benchmark ('find' with lots of output) it seems to be around 1009600. 
> Here's a table (numbers are different from before because they're 
> results of (benchmark 5 ...) divided by 5, meaning GC is amortized:
> 
> |    4096 | 0.78 |
> |   16368 | 0.69 |
> |   40960 | 0.65 |
> |  409600 | 0.59 |
> | 1009600 | 0.56 |
> | 2009600 | 0.64 |
> | 4009600 | 0.65 |

Not enough data points between 40960 and 409600, IMO.  40960 sounds
like a good spot for the default value.

> >> And I think we should make the process "remember" the value at its
> >> creation either way (something touched on in bug#38561): in bug#55737 we
> >> added an fcntl call to make the larger values take effect. But this call
> >> is in create_process: so any subsequent increase to a large value of
> >> this var won't have effect.
> > 
> > Why would the variable change after create_process?  I'm afraid I
> > don't understand what issue you are trying to deal with here.
> 
> Well, what could we lose by saving the value of read-process-output-max 
> in create_process?

It's already recorded in the size of the pipe, so why would we need to
record it once more?

> Currently I suppose one could vary its value while a process is
> still running, to implement some adaptive behavior or whatnot. But
> that's already semi-broken because fcntl is called in
> create_process.

I see no reason to support such changes during the process run,
indeed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 14:37:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 10:37:49 2023
Received: from localhost ([127.0.0.1]:34598 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjKoO-00075t-MQ
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 10:37:49 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34597)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qjKoJ-00075a-4H
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 10:37:47 -0400
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.nyi.internal (Postfix) with ESMTP id 9409D5C0180;
 Thu, 21 Sep 2023 10:37:27 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Thu, 21 Sep 2023 10:37:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm1; t=
 1695307047; x=1695393447; bh=SGAA9obZLcqxFDzFTRshOfwhArV4juGnY0h
 ntVoMqyE=; b=4M8xYXQOmo9fzfqxBvzoiVOx0CQIO49AnGfaInGAb0sZlHypFOK
 R62WYTSvZDr5X3j+kzLkBpfluEEafhZ4BHi9CnffbzOTpnJB+8f2rI8gRMXf6JMt
 tIrtl66VBHYGnATBCquLqMaRwNc4yPekdarFERI0ml9C7/ESyu0bAK5JsMeCeXlF
 n1c6AGIWjI0h3vjdv6MaeOoioarcUzMwz7t183n4V0Bq9XJTRcMsgmTdJ/1xYy49
 +jcKo3JeWYAMKyxOU8ibqMb3BF1CmmnLvNEbCacVmjXtLj51KxePQXX/7CM/SEW0
 fSeB2mjuhGApEDuXeEgd8o86KK9U9UEZQXQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1695307047; x=1695393447; bh=SGAA9obZLcqxFDzFTRshOfwhArV4juGnY0h
 ntVoMqyE=; b=p6uhDK7uhGL39RuSWIu+j7VRamjra2hM/fm5rHZ0CHTRs9oh7Ab
 Imq+12H62pjHLzbjoVFSs7DBggUanE2GosRdV0OcqBCtvu2k7vCx8D0t2g1g2tpA
 goLuyJoY5EodWJS+DV40tRFIPXH9pplk90iYkkigL+yHL7L3kEGvRyLtqLEIhWNi
 EiuwPc3TOO8iUjghABlY0f5Y2GB3Nl1W43z3PkPKslgfN8tN0hD3ULzOXdUYjAlc
 3pDppjAIch3YzD38n7OSitT9GoVUsK2pxGzjzuU9zuTZVdiA0o+Cci3XAKIlEaVd
 7O5Fwg1mcLJfxQce67NZ9ETIjtPxagcSjjA==
X-ME-Sender: <xms:JlUMZdQdsksgcQFkIlgyJ6rQBSlMKR9_CjtuTY4uzmWl_a7HPzTuJg>
 <xme:JlUMZWxHCeGAvDGFA8n7I7BJnsMhz0IP4YBOCNKKyZVFd93eIciqAmiaTEbcLFQQ0
 tokF3H9KTGE7z__IUg>
X-ME-Received: <xmr:JlUMZS3JDp63ta9h3sQZ3Y6qm-TFR2WKtfuTc2Nd-gUdp7Bw-KNJ_-oOc8hOlXo>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekiedgjeekucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel
 vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:JlUMZVCCaVXUYn-fFRKvq8TKYgUuWp-a-sSj3oQXTqg-DyX38Ueh9g>
 <xmx:JlUMZWggBOeacU5uhPkG4LcEoZtmN1u8J_ZrOTtJXujIT6_0JqaY0Q>
 <xmx:JlUMZZrYpaKoSfdVaTAgpmOiCPH44WWkvgv6fo0z51n3Yw6ad8zjMw>
 <xmx:J1UMZZvSe1uVOFXPt2o3a1K8ItPHuMD8xR3N-LnxMSL0FZ-5QzscvQ>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 21 Sep 2023 10:37:25 -0400 (EDT)
Message-ID: <fd3be08e-d23b-744e-d435-c926992bc9a9@HIDDEN>
Date: Thu, 21 Sep 2023 17:37:23 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN> <83bkfs2tw5.fsf@HIDDEN>
 <18a0b4d8-32bd-3ecd-8db4-32608a1ebba7@HIDDEN> <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> <83led09dlk.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <83led09dlk.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, stefankangas@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.2 (---)

On 21/09/2023 10:42, Eli Zaretskii wrote:
>> Date: Thu, 21 Sep 2023 03:57:43 +0300
>> Cc: 66020 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dmitry@HIDDEN>
>>
>> That leaves the question of what new value to use. 409600 is optimal for
>> a large-output process but seems too much as default anyway (even if I
>> have very little experimental proof for that hesitance: any help with
>> that would be very welcome).
> 
> How does the throughput depend on this value?  If the dependence curve
> plateaus at some lower value, we could use that lower value as a
> "good-enough" default.

Depends on what we're prepared to call a plateau. Strictly speaking, not 
really. But we have a "sweet spot": for the process in my original 
benchmark ('find' with lots of output) it seems to be around 1009600. 
Here's a table (numbers are different from before because they're 
results of (benchmark 5 ...) divided by 5, meaning GC is amortized:

|    4096 | 0.78 |
|   16368 | 0.69 |
|   40960 | 0.65 |
|  409600 | 0.59 |
| 1009600 | 0.56 |
| 2009600 | 0.64 |
| 4009600 | 0.65 |

The process's output length is 27244567 in this case. Still above the 
largest of the buffers in this example.

Notably, only allocating the buffer once at the start of the process 
(experiment mentioned in the email to Stefan M.) doesn't change the 
dynamics: buffer lengths above ~1009600 make the performance worse.

So there must be some negative factor associated with higher buffers. 
There is an obvious positive one: the longer the buffer, the longer we 
don't switch between processes, so that overhead is lower.

We could look into improving that part specifically: for example, 
reading from the process multiple times into 'chars' right away while 
there is still pending output present (either looping inside 
read_process_output, or calling it in a loop in 
wait_reading_process_output, at least until the process' buffered output 
is exhausted). That could reduce reactivity, however (can we find out 
how much is already buffered in advance, and only loop until we exhaust 
that length?)

>> I did some more experimenting, though. At a superficial glance,
>> allocating the 'chars' buffer at the beginning of read_process_output is
>> problematic because we could instead reuse a buffer for the whole
>> duration of the process. I tried that (adding a new field to
>> Lisp_Process and setting it in make_process), although I had to use a
>> value produced by make_uninit_string: apparently simply storing a char*
>> field inside a managed structure creates problems for the GC and early
>> segfaults. Anyway, the result was slightly _slower_ than the status quo.
>>
>> So I read what 'alloca' does, and it looks hard to beat. But it's only
>> used (as you of course know) when the value is <= MAX_ALLOCA, which is
>> currently 16384. Perhaps an optimal default value shouldn't exceed this,
>> even if it's hard to create a benchmark that shows a difference. With
>> read-process-output-max set to 16384, my original benchmark gets about
>> halfway to the optimal number.
> 
> Which I think means we should stop worrying about the overhead of
> malloc for this purpose, as it is fast enough, at least on GNU/Linux.

Perhaps. If we're not too concerned about memory fragmentation (that's 
the only explanation I have for the table "session gets older" -- last 
one -- in a previous email with test-ls-output timings).

>> And I think we should make the process "remember" the value at its
>> creation either way (something touched on in bug#38561): in bug#55737 we
>> added an fcntl call to make the larger values take effect. But this call
>> is in create_process: so any subsequent increase to a large value of
>> this var won't have effect.
> 
> Why would the variable change after create_process?  I'm afraid I
> don't understand what issue you are trying to deal with here.

Well, what could we lose by saving the value of read-process-output-max 
in create_process? Currently I suppose one could vary its value while a 
process is still running, to implement some adaptive behavior or 
whatnot. But that's already semi-broken because fcntl is called in 
create_process.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 13:17:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 09:17:45 2023
Received: from localhost ([127.0.0.1]:33008 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjJYv-0004Z1-7B
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 09:17:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59124)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qjJYt-0004Yp-RP
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 09:17:44 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qjJYc-00011s-Qy; Thu, 21 Sep 2023 09:17:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=rUvAryZyNSyJmK+FWZ2CWBuYlTLCp+FEOigX0z1E/VQ=; b=Jv5t0szL2Lac
 xnoPIfJDOIRF7mXDRMxbhIG9k+EUoCwZthSuTfCOgUnRJWm1mk2ydLidzAciwKm1ubQbx06rqVZiC
 4GRNEmev9OPewnzalG/zsaiSjU7lBvZlIXFrceqMOJSRiukTEDNEx/a+pr8zvW6hrQthgfXnJc9xb
 ajES7FPBOVHOyGTeJ/NAD0T0+fPAgqf2F5VTyXVVzItCjLWIGIN2BL8dFuj40uHyfYkzTufma46Yy
 QB4WN6BgcxGtPr32SfisRDKmq7nEWVOzv9vrL6o8Q/wuJ4QCVEP9ektxVZkTCPKdeaeuWNIW8hKpP
 Rc9AWfvofI5OVgzPlX1T1g==;
Date: Thu, 21 Sep 2023 16:17:31 +0300
Message-Id: <8334z7acno.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <b4f2135b-be9d-2423-02ac-9690de8b5a92@HIDDEN> (message from
 Dmitry Gutov on Thu, 21 Sep 2023 15:27:41 +0300)
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <CADwFkmkUUVS1nwkyWkvpUahx85ZkVp58D9A-jDEZ_QgH23XxGQ@HIDDEN>
 <b4f2135b-be9d-2423-02ac-9690de8b5a92@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, stefankangas@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 21 Sep 2023 15:27:41 +0300
> Cc: 66020 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> >      https://lists.gnu.org/r/emacs-devel/2021-03/msg01461.html
> 
> The archive seems down (so I can't read this), but if you found a 
> tangible improvement from the above setting, you might also want to try 
> out the patch at the top of this bug report.

It is back up now.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 13:16:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 09:16:47 2023
Received: from localhost ([127.0.0.1]:33003 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjJXy-0004XN-Nt
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 09:16:47 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53752)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qjJXu-0004X7-4U
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 09:16:45 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qjJXd-0000aL-Nq; Thu, 21 Sep 2023 09:16:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=BltP3jySIVDwuXLIIfafYqDJQOceK1PSJ1ImbPUVUHQ=; b=Ig5AmKuCesIA
 So6GnFKcU9Y0/XpYeRgrIP54tPXRl0X5l6WWN9/py/4i1N+Z06mgwhoZppAT8G92Rb/5WySL0pdoq
 t654H5JWezPmbhHuL1HP2/9JclMJkEvkZa714ZGxlMZoCgpLWOp6tGiWcWT7LQP6Mgx4SPdzbkMZ0
 p5hE6ITr8SLcxFYD9WDo9NnpajX8hAu81gSioyv3p8p0jHALkUtbTXPHKkxgc4+/E0B8zgzr5arbo
 QCF33M6J2p5XdzTEJCVtH8Pv+Ysf0Od8xyD0Db4e4QZzRgdxReEzYL5w3TBvVrtN8gksaraOq7WF8
 LFIcYDOiGUCFIIZuDbgj0Q==;
Date: Thu, 21 Sep 2023 16:16:31 +0300
Message-Id: <834jjnacpc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <58e9135f-915d-beb9-518a-e814ec2a0c5b@HIDDEN> (message from
 Dmitry Gutov on Thu, 21 Sep 2023 15:20:57 +0300)
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
 <jwvr0msl0ir.fsf-monnier+emacs@HIDDEN>
 <58e9135f-915d-beb9-518a-e814ec2a0c5b@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, monnier@HIDDEN, stefankangas@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 21 Sep 2023 15:20:57 +0300
> Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>,
>  66020 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> On 21/09/2023 05:36, Stefan Monnier wrote:
> >> make_process), although I had to use a value produced by make_uninit_string:
> >> apparently simply storing a char* field inside a managed structure creates
> >> problems for the GC and early segfaults. Anyway, the result was slightly
> > That should depend on*where*  you put that field.  Basically, it has to
> > come after:
> > 
> >      /* The thread a process is linked to, or nil for any thread.  */
> >      Lisp_Object thread;
> >      /* After this point, there are no Lisp_Objects.  */
> > 
> > since all the words up to that point will be traced by the GC (and
> > assumed to be Lisp_Object fields).
> 
> Ah, thanks. That calls for another try.
> 
> ...still no improvement, though no statistically significant slowdown 
> either this time.

Why did you expect a significant improvement?  Allocating and freeing
the same-size buffer in quick succession has got to be optimally
handled by modern malloc implementations, so I wouldn't be surprised
by what you discover.  There should be no OS calls, just reuse of a
buffer that was just recently free'd.  The overhead exists, but is
probably very small, so it is lost in the noise.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 08:08:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 04:08:00 2023
Received: from localhost ([127.0.0.1]:32784 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjEj0-0007cz-RV
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 04:08:00 -0400
Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:45255)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qjEiw-0007ci-FF
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 04:07:49 -0400
Received: by mail-lj1-x22e.google.com with SMTP id
 38308e7fff4ca-2c12ae20a5cso9720891fa.2
 for <66020 <at> debbugs.gnu.org>; Thu, 21 Sep 2023 01:07:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695283650; x=1695888450; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=kzlQFOaC+Q3zJzjHAjO4S6rYU0isMOq4zT6nPQedVUs=;
 b=Sj9o+NKRQNxP6BT3mOO7xKRXqvURDpwtMPEObbhAUKHB0G5TZsFqvLRzpivf3siO8p
 q4OGCKO9jqyWEq60yx+9wOJv1U8USnPkuF8nSaNR7rYGJXE1BMiF2K6k1vLF93EsO458
 cXcYd31QyZHvCu7jg66net7rYYIjzyzJo6BAVKN8J5jocQNCu8JIPkJ5c+DQNjNDM0kc
 RUQy8mFpnJw19n98DDMxnkXK4shtpg4GU5OzSQ6aETc/qeqPMhu7QIfu4FTCtmUi5sjE
 F2qOjhDq/DKLJh2dPDRAAQbLD92zFc85CLVMowHadGv0yQQPb6fqACaAnq9rPS1HSuMH
 iydw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695283650; x=1695888450;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=kzlQFOaC+Q3zJzjHAjO4S6rYU0isMOq4zT6nPQedVUs=;
 b=Sa0WjzAGpPRUA4cz5tOUj5RavRljhxUjLUJm0YRTwLAjXh06OD0Tse7JxHlbnAaNqk
 2pdoH987CjEVKOpGjnNWML3xcg3d1KVnzyJZDEyxachsU8fGKG8mhymTT1ZsH+EyMFRa
 SQzbOPC316W4Nwd6oroVVuAjIokU3NfEcUOraAJYMXYn1hWCK6aWnkwceQuEtgaMkJJY
 B4ZT9Jwf8p2jtoVjBXKVgPcTOD2o5TyzSiKit294q/Byrpw3wRra5OAYXjAG9QADgO/P
 84FtYB57c0hkxYPipHIIf4zdBvjsY2JoZDOcVGjnDj8s2aO9gw9mq2FWqE1IdLX33fAs
 1GIQ==
X-Gm-Message-State: AOJu0YzfqVS9K45MCeH8i6MsqPXpqTyxx7FPuF047FsE/fze9Hg8+APx
 58oXgbsV6WVG3pSuEfLsgnqLw++7IdVvWNl2MO0=
X-Google-Smtp-Source: AGHT+IFZLzC/Z7NkNUmpXPqr6ukiZmFOtFhuJR3x9TQUbLK/L3UtGCaWpRszIrQRqQwLNGpHq/i9FeFtbtj6mfhnitA=
X-Received: by 2002:a2e:924d:0:b0:2bf:aba1:d951 with SMTP id
 v13-20020a2e924d000000b002bfaba1d951mr4475355ljg.10.1695283649821; Thu, 21
 Sep 2023 01:07:29 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Thu, 21 Sep 2023 01:07:29 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <83zg1hay6q.fsf@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN>
 <8334zmtwwi.fsf@HIDDEN> <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN>
 <83tts0rkh5.fsf@HIDDEN> <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN>
 <831qf3pd1y.fsf@HIDDEN> <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN>
 <83sf7jnq0m.fsf@HIDDEN> <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN> <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN> <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN> <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN> <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN> <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN>
MIME-Version: 1.0
Date: Thu, 21 Sep 2023 01:07:29 -0700
Message-ID: <CADwFkmkUUVS1nwkyWkvpUahx85ZkVp58D9A-jDEZ_QgH23XxGQ@HIDDEN>
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
To: Eli Zaretskii <eliz@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN>, 
 Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> Stefan & Stefan: any comments or suggestions?

FWIW, I've had the below snippet in my .emacs for the last two years,
and haven't noticed any adverse effects.  I never bothered making any
actual benchmarks though:

    ;; Maybe faster:
    (setq read-process-output-max
          (max read-process-output-max (* 64 1024)))

I added the above after the discussion here:

    https://lists.gnu.org/r/emacs-devel/2021-03/msg01461.html




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 07:42:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 21 03:42:44 2023
Received: from localhost ([127.0.0.1]:60965 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qjEKi-0006sx-Ic
	for submit <at> debbugs.gnu.org; Thu, 21 Sep 2023 03:42:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57146)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qjEKf-0006se-Qi
 for 66020 <at> debbugs.gnu.org; Thu, 21 Sep 2023 03:42:43 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qjEKP-0007R5-Jl; Thu, 21 Sep 2023 03:42:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=w+0GZ/5eXjdtFkS7bVhhktO6ZAl+vYVgjqojSSPvd0k=; b=h72htidNP5Uc
 kE/RFJOVPAFlRfgDRnkgfHPliQsRXRqwVjv6SMw7zfXP3rkguIMggoJx8CsDtZ1aTh66dcXmSVZIX
 YUGO4E4y2EeO5gdC2OuirU2+dCmTXQM+qykOZZvAkdCWHVZHAaur1N1Az1l2NARc7KX4y7oKkR+ku
 273bvCk4dwujxqRzU9a/uoVrJVHEw72ENFQdskl38kaehT5TiJhSjpakPnCRO9gwizwidZg5evUMy
 1cjfnsuitPYqWJTs3/0XZXXD+uyEGu8IU3j8qr4Z+XyUN7uc4UU4AKe9AQjL29MuR8Ko+gr3Ig7vQ
 gWBIRhz0jqj0c4OhvNxlKw==;
Date: Thu, 21 Sep 2023 10:42:31 +0300
Message-Id: <83led09dlk.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> (message from
 Dmitry Gutov on Thu, 21 Sep 2023 03:57:43 +0300)
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN> <83pm4bi6qa.fsf@HIDDEN>
 <d319bd54-3f0d-a205-3412-ef3961074416@HIDDEN> <83bkfs2tw5.fsf@HIDDEN>
 <18a0b4d8-32bd-3ecd-8db4-32608a1ebba7@HIDDEN> <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org, stefankangas@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 21 Sep 2023 03:57:43 +0300
> Cc: 66020 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> That leaves the question of what new value to use. 409600 is optimal for 
> a large-output process but seems too much as default anyway (even if I 
> have very little experimental proof for that hesitance: any help with 
> that would be very welcome).

How does the throughput depend on this value?  If the dependence curve
plateaus at some lower value, we could use that lower value as a
"good-enough" default.

> I did some more experimenting, though. At a superficial glance, 
> allocating the 'chars' buffer at the beginning of read_process_output is 
> problematic because we could instead reuse a buffer for the whole 
> duration of the process. I tried that (adding a new field to 
> Lisp_Process and setting it in make_process), although I had to use a 
> value produced by make_uninit_string: apparently simply storing a char* 
> field inside a managed structure creates problems for the GC and early 
> segfaults. Anyway, the result was slightly _slower_ than the status quo.
> 
> So I read what 'alloca' does, and it looks hard to beat. But it's only 
> used (as you of course know) when the value is <= MAX_ALLOCA, which is 
> currently 16384. Perhaps an optimal default value shouldn't exceed this, 
> even if it's hard to create a benchmark that shows a difference. With 
> read-process-output-max set to 16384, my original benchmark gets about 
> halfway to the optimal number.

Which I think means we should stop worrying about the overhead of
malloc for this purpose, as it is fast enough, at least on GNU/Linux.

> And I think we should make the process "remember" the value at its 
> creation either way (something touched on in bug#38561): in bug#55737 we 
> added an fcntl call to make the larger values take effect. But this call 
> is in create_process: so any subsequent increase to a large value of 
> this var won't have effect.

Why would the variable change after create_process?  I'm afraid I
don't understand what issue you are trying to deal with here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 02:36:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 20 22:36:39 2023
Received: from localhost ([127.0.0.1]:60721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qj9YV-0006xd-1d
	for submit <at> debbugs.gnu.org; Wed, 20 Sep 2023 22:36:39 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18151)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qj9YS-0006xQ-Nc
 for 66020 <at> debbugs.gnu.org; Wed, 20 Sep 2023 22:36:37 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 872E0442A6B;
 Wed, 20 Sep 2023 22:36:21 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1695263780;
 bh=VqFa2tYyWljRPjSaoSLlRenp7Xu3q0tg4LMC7uC/yos=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=FcH2ZLdpN/zc7IW8uGwtE+Ch7jGsRyRs7TG7L+G53A3OHElEPiPU06MdAewcSiP3H
 1/sSWlJNf960tl6I7c2kISdLBmqCDlB5cY+3O8aZkjzncL9wmxhHx2tth+4ZODoF2h
 DXi11vMV3zRhcX0fF/G4MPQoeei9QYrlbp5tNhTYxLby81n9V2SxD06LKRlR9wqZzm
 xcfNqn6/ZDCIx4W0ioxuTquMot8i9ZhyKqV/SFXLpHc/1jQz/5+oE1ZOG3IU7i26M3
 74Fl/nir+tZOCWA5SMM82pGUwF2G9YD+Rcc21jf8z/Nt/VROoAKxVOlpbHJmCyLNb/
 pku4SoRJ9aD9Q==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 14DAC44214A;
 Wed, 20 Sep 2023 22:36:20 -0400 (EDT)
Received: from pastel (unknown [45.72.220.249])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DE7901204BB;
 Wed, 20 Sep 2023 22:36:19 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
In-Reply-To: <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN> (Dmitry Gutov's
 message of "Thu, 21 Sep 2023 03:57:43 +0300")
Message-ID: <jwvr0msl0ir.fsf-monnier+emacs@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN>
 <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN>
 <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN>
 <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
 <83zg1hay6q.fsf@HIDDEN>
 <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
Date: Wed, 20 Sep 2023 22:36:18 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.021 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>,
 66020 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> make_process), although I had to use a value produced by make_uninit_string:
> apparently simply storing a char* field inside a managed structure creates
> problems for the GC and early segfaults. Anyway, the result was slightly

That should depend on *where* you put that field.  Basically, it has to
come after:

    /* The thread a process is linked to, or nil for any thread.  */
    Lisp_Object thread;
    /* After this point, there are no Lisp_Objects.  */

since all the words up to that point will be traced by the GC (and
assumed to be Lisp_Object fields).  But of course, if you created the
buffer with `make_uninit_string` then it'll be inside the Lisp heap and
so it'll be reclaimed if the GC doesn't find any reference to it.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 21 Sep 2023 00:58:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 20 20:58:06 2023
Received: from localhost ([127.0.0.1]:60677 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qj817-0004I9-NP
	for submit <at> debbugs.gnu.org; Wed, 20 Sep 2023 20:58:06 -0400
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:44225)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qj814-0004Hd-DK
 for 66020 <at> debbugs.gnu.org; Wed, 20 Sep 2023 20:58:04 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 81A125C01F4;
 Wed, 20 Sep 2023 20:57:47 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Wed, 20 Sep 2023 20:57:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm3; t=
 1695257867; x=1695344267; bh=/SMKlPMD5eNouTqIWYRhKVgZZJpXTfFocMz
 gA4OnJr0=; b=ftTBKGCkWLYaBKyOPxzkdOnaJ13lbR6mt8ThgjMQ7futVjc4LIE
 5R5TKmXCG/wROvjVgWSNLP9U6gMTuomAcCxf6/lFgx9tsq1Y4G3EI5nIgeN96jLB
 XwexGMSG3dP3eaKoX5yRzE7bsxhxOk0iDmt/t98RsjIxxbu2j3oFvSzwpLlCXxye
 RDNW+vTr6Ejdb8RObOsaqYAEMmb2xTTRwLQpAtgdsM6VhaBB5QzKzuiq2cUjLZyD
 t6OVNfsr1yUPTvI4FnauoDYfTEmeS0Y0OhHhw6O3hZCEuODW0z+H4PNiomRlOZ0H
 VnRkPBLJPLo7PHb/qzP+AtF3A3TaZA2h6GA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1695257867; x=1695344267; bh=/SMKlPMD5eNouTqIWYRhKVgZZJpXTfFocMz
 gA4OnJr0=; b=WqcwNG7eeaVzJCSywc7GFMTTb0TJ89dDtS+V4+cnrVcaE1sbUx4
 2RJIlnA/qp+m9z3SCh7eHZtDsWPjoueEpb4NDy4uGZs+ihszwi9RYqmQephQzx2z
 HQDKe1yasrcrhChL864s0LdwVBDyOoevVNl4B+NU0KTcB0WfYUPYJDb/Jfp/Ol9t
 dahXf6Wm+5jpo6iGUeWCcJ5W7aNtrpmnphSwrDiJRs6r58vH5FTTgxlrWiEN88fN
 vusjNLbiuypFu/5Da0tNE654r2bqLvm/LCAh8FWPqetFrGCjHMag2RXlULbJrpBy
 IQ90k4qHbdEmx7kN2QGLF3tTgz6B9o/XSuQ==
X-ME-Sender: <xms:C5ULZYplF87DfNfBwOyvjGsZegVX2Hr3yezTTe-t-or1_B4JANuk8w>
 <xme:C5ULZepTXlT5kMN-NkB58aH1iF6uKeEBnUiOpR1ANqlPmJYY7H1HINktH45nBz_PN
 4h4jYo5SPlSH3_TxlI>
X-ME-Received: <xmr:C5ULZdNOpurNM7UwpJDaeTrSkxiWU-1I76YmjIBVvco2BnYW02l_TTgTJfRnA3w>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekgedgfeelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel
 vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:C5ULZf6NCD1LJko88GsxPu08XSd2_zs-r2ztff3p42tN0fyeRq4aug>
 <xmx:C5ULZX5tohKSr7NQdW6L8asyiT-EytwbsEeXAFrIjpRCP_tzkUVMnQ>
 <xmx:C5ULZfhulpJS89tH3EIJOp3JrRTpPOvBtKxAaCPOJp55E7blXO9ZXw>
 <xmx:C5ULZXFs8hrLETYB7Tp6SAapMGQQhRHN0RoERTDkYOPJ4Nxt0JY0wA>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 20 Sep 2023 20:57:45 -0400 (EDT)
Message-ID: <451d6012-e5ab-df6c-50e3-dac20b91781c@HIDDEN>
Date: Thu, 21 Sep 2023 03:57:43 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN> <83pm4bi6qa.fsf@HIDDEN>
 <d319bd54-3f0d-a205-3412-ef3961074416@HIDDEN> <83bkfs2tw5.fsf@HIDDEN>
 <18a0b4d8-32bd-3ecd-8db4-32608a1ebba7@HIDDEN> <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN> <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN> <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN> <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN> <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN> <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN> <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN> <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN> <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN> <83a5tmk79p.fsf@HIDDEN>
 <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> <83zg1hay6q.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <83zg1hay6q.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.2 (---)

On 20/09/2023 14:20, Eli Zaretskii wrote:
>> Date: Tue, 19 Sep 2023 22:59:43 +0300
>> Cc: 66020 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dmitry@HIDDEN>
>>
>> - Maybe we declare the difference insignificant and bump the value of
>> read-process-output-max, given that it helps in other cases,
>> - Or try to find out the cause for degradation,
>> - Or keep the default the same, but make it easier to use different
>> value for different processes (meaning, we resurrect the discussion in
>> bug#38561).
> 
> I'd try the same experiment on other use cases, say "M-x grep" and
> "M-x compile" with large outputs, and if you see the same situation
> there (i.e. larger buffers are no worse), try increasing the default
> value on master.

I've run one particular rgrep search a few times (24340 hits, ~44s when 
the variable's value is either 4096 or 409600). And it makes sense that 
there is no difference: compilation modes do a lot more work than just 
capturing the process output or splitting it into strings.

That leaves the question of what new value to use. 409600 is optimal for 
a large-output process but seems too much as default anyway (even if I 
have very little experimental proof for that hesitance: any help with 
that would be very welcome).

I did some more experimenting, though. At a superficial glance, 
allocating the 'chars' buffer at the beginning of read_process_output is 
problematic because we could instead reuse a buffer for the whole 
duration of the process. I tried that (adding a new field to 
Lisp_Process and setting it in make_process), although I had to use a 
value produced by make_uninit_string: apparently simply storing a char* 
field inside a managed structure creates problems for the GC and early 
segfaults. Anyway, the result was slightly _slower_ than the status quo.

So I read what 'alloca' does, and it looks hard to beat. But it's only 
used (as you of course know) when the value is <= MAX_ALLOCA, which is 
currently 16384. Perhaps an optimal default value shouldn't exceed this, 
even if it's hard to create a benchmark that shows a difference. With 
read-process-output-max set to 16384, my original benchmark gets about 
halfway to the optimal number.

And I think we should make the process "remember" the value at its 
creation either way (something touched on in bug#38561): in bug#55737 we 
added an fcntl call to make the larger values take effect. But this call 
is in create_process: so any subsequent increase to a large value of 
this var won't have effect. Might as well remember it there (in a new 
field), then it'll be easier to use different values of it for different 
processes (set using let-binding at the time of the process' creation).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 20 Sep 2023 11:20:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 20 07:20:31 2023
Received: from localhost ([127.0.0.1]:58460 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qivFv-0006LO-6T
	for submit <at> debbugs.gnu.org; Wed, 20 Sep 2023 07:20:31 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40686)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qivFq-0006L7-Nu
 for 66020 <at> debbugs.gnu.org; Wed, 20 Sep 2023 07:20:30 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qivFb-0001vy-Cc; Wed, 20 Sep 2023 07:20:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=JP2b9RpeZ7FmPsh83Q1X1ZHL/qBavOYid9XK4OCTkSY=; b=fr4CuHnXW3by
 iQwFUOl0qnBJ6HpdUTHAuK45KYwoBM2YmjB34whTCwFwrNEphf+R0+06yMZRfa+I+gb7ZSYbRXPly
 7TczskzNp5GmvzBP0jWotczCAg0OuQgRB7G027SSyI490krApzz6FrAbmdtU8BvGoY3TSNHzQD8LD
 M8jAplYmiRWsEoMXValK0egYU4doxIwpe7rlL8k3WDretRg0gPp5c6+yApQ6zSV4elyqUuXtlJfQ4
 LeEEgoKy009JpMlzEds/0CRdARSoT6dM121TUdx/tNu6WyPAoPeqp9pyxIQQXXad4aCjgy/Kfhbu0
 7cgrjQ0uYJ5qd8wKXuKbpw==;
Date: Wed, 20 Sep 2023 14:20:13 +0300
Message-Id: <83zg1hay6q.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN> (message from
 Dmitry Gutov on Tue, 19 Sep 2023 22:59:43 +0300)
Subject: Re: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
References: <iermszrwqj4.fsf@HIDDEN>
 <35f8b664-0241-9f96-1aa0-20ca51b2d34c@HIDDEN>
 <59c30342-a7e0-d83b-a128-0faae4cbd633@HIDDEN>
 <83pm4bi6qa.fsf@HIDDEN>
 <d319bd54-3f0d-a205-3412-ef3961074416@HIDDEN>
 <83bkfs2tw5.fsf@HIDDEN>
 <18a0b4d8-32bd-3ecd-8db4-32608a1ebba7@HIDDEN>
 <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN>
 <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN>
 <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN>
 <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN>
 <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN> <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 19 Sep 2023 22:59:43 +0300
> Cc: 66020 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> - Maybe we declare the difference insignificant and bump the value of 
> read-process-output-max, given that it helps in other cases,
> - Or try to find out the cause for degradation,
> - Or keep the default the same, but make it easier to use different 
> value for different processes (meaning, we resurrect the discussion in 
> bug#38561).

I'd try the same experiment on other use cases, say "M-x grep" and
"M-x compile" with large outputs, and if you see the same situation
there (i.e. larger buffers are no worse), try increasing the default
value on master.

Stefan & Stefan: any comments or suggestions?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.

Message received at 66020 <at> debbugs.gnu.org:


Received: (at 66020) by debbugs.gnu.org; 19 Sep 2023 20:00:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 19 16:00:06 2023
Received: from localhost ([127.0.0.1]:57855 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qigtB-0000vY-Fk
	for submit <at> debbugs.gnu.org; Tue, 19 Sep 2023 16:00:06 -0400
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58893)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qigt8-0000uT-Ns
 for 66020 <at> debbugs.gnu.org; Tue, 19 Sep 2023 16:00:04 -0400
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.nyi.internal (Postfix) with ESMTP id 3DD6D5C01AA;
 Tue, 19 Sep 2023 15:59:48 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Tue, 19 Sep 2023 15:59:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm3; t=
 1695153588; x=1695239988; bh=O2MS+YZGx/qBn4Xj9GVu4SjO0x3m8JC4VSs
 qXXmB7Ck=; b=hhuHbUXTvbhwUloJ4wyqHiBXkPI9oLZ4vL35zZ4h6s/MaZ6fXQO
 YqJt+D69oAYdfWbJV5o+Jd3o48JpixdF3sUa/8R7Th7jsy0z9IYbFxscGnP0RW3H
 1CDUQizlw02z1Etfm9mbS1YlVGgUIcuTc3uxVrj+XTwQifUs0y9daacIsKuI/abx
 ga0er+M3Re8BB0QNDZIyMcv1rtgm3HOSHQ5nY4bmuFI/iTxFzqOFGrb9Ko4gbvW7
 m+P7PUcRQtA8Vtu9PMVZYdjH7xzGU9vBljHKOvza3mRPBlV7f+EDHz+8760x+VUW
 fyiapAm+yDdXCr8f0vQjUS5wMnqvptAek4A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1695153588; x=1695239988; bh=O2MS+YZGx/qBn4Xj9GVu4SjO0x3m8JC4VSs
 qXXmB7Ck=; b=N7A+A7p5uchSAYMz6ojNh61/irnuk2xF62Bj0T96C0dyFQ1zGlJ
 uA3J24/zDBPxRPBg/mZFeUM891+WGWoub7XsEB9vG50ucj+9aYot/96ivaK5PiOK
 fHgKNaMeQ/MGX9jQllrOLLpqbYlRrOM1NFF4v1/ei1eUeck45sKR8P7BHjFCGw0c
 Lm5bv4MrLZoumZq+dULA3dIcCY7ie8jxwhyQfpE3dO/rlHggfQnzW6kz6k/gI+uE
 TMsQck/JuyyLz0nyTHVgSuraC60wu3Khk5VrFzMrvLMhiATPBzlZyA2cQ9KCoYVG
 o00uH+5/F6yhUzhsxlQUAuu0Ssh/Fnar5zw==
X-ME-Sender: <xms:s_0JZS7jYKB49FN4abMwWwKthFolfOEk0e4lYT1Y4YHMMgl0kx_mRw>
 <xme:s_0JZb4quu_ZMeZoLzJ_LGjN6FMB2hvH5Rz1Z5cleeeQqEVmmbxKP6xz4aCSclHuK
 cneS0EIqdViQECecSs>
X-ME-Received: <xmr:s_0JZRc_M3dxKM35rX3E8tNGEQVmgXuuyNJ3aAd8Twnq_hX6EmDNwdBLRsH4Cso>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekuddguddufecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev
 ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 gumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:s_0JZfLylyttU6JEP9SOSALJM9b4npUyuaQj2Uu05c736c4vfRnqwA>
 <xmx:s_0JZWKhUyOpuSV4nuiKsyiaJn1Lqf7tg74va-r5MJhwLL3ZaxQY_w>
 <xmx:s_0JZQxf2HBehqTyPkxugjArpCcv5_bo6hOX_ojne55tZXwrgEtoqg>
 <xmx:tP0JZQyIasFlhGYXi6e9fC5XDGp2v0jth0uzIuPctZUSA05c0llUjA>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 19 Sep 2023 15:59:47 -0400 (EDT)
Message-ID: <937d9927-506f-aa36-94e9-3cceb8f629dd@HIDDEN>
Date: Tue, 19 Sep 2023 22:59:43 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: bug#66020 (bug#64735 spin-off): regarding the default for
 read-process-output-max
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>
References: <iermszrwqj4.fsf@HIDDEN>
 <35f8b664-0241-9f96-1aa0-20ca51b2d34c@HIDDEN>
 <59c30342-a7e0-d83b-a128-0faae4cbd633@HIDDEN>
 <83pm4bi6qa.fsf@HIDDEN>
 <d319bd54-3f0d-a205-3412-ef3961074416@HIDDEN>
 <83bkfs2tw5.fsf@HIDDEN>
 <18a0b4d8-32bd-3ecd-8db4-32608a1ebba7@HIDDEN>
 <83il8lxjcu.fsf@HIDDEN>
 <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@HIDDEN>
 <8334zmtwwi.fsf@HIDDEN>
 <e480d2fb-0912-c9d6-66c8-d11e07482545@HIDDEN>
 <83tts0rkh5.fsf@HIDDEN>
 <e6dd2d5c-9a88-6e18-f1e2-544a9cb1beaf@HIDDEN>
 <831qf3pd1y.fsf@HIDDEN>
 <28a7916e-92d5-77ab-a61e-f85b59ac76b1@HIDDEN>
 <83sf7jnq0m.fsf@HIDDEN>
 <5c493f86-0af5-256f-41a7-7d886ab4c5e4@HIDDEN>
 <83ledanvzw.fsf@HIDDEN>
 <bc4bb3de-d433-7249-cb53-2f312656589d@HIDDEN>
 <83r0n2m7qz.fsf@HIDDEN>
 <26afa109-9ba3-78a3-0e68-7585ae8e3a19@HIDDEN>
 <83il8dna30.fsf@HIDDEN>
 <e46f996a-0bed-8796-23d7-c9c8b7d428be@HIDDEN>
 <83bke5mhvs.fsf@HIDDEN>
 <edb397b8-d3da-6646-0a97-841ebcae2e7a@HIDDEN>
 <83a5tmk79p.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <83a5tmk79p.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 66020
Cc: 66020 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is another continuation from bug#64735, a subthread in this bug 
seems more fitting, given that I did most of the tests with its patch 
applied.

On 16/09/2023 08:37, Eli Zaretskii wrote:
>> Date: Sat, 16 Sep 2023 04:32:26 +0300
>> Cc:luangruo@HIDDEN,sbaugh@HIDDEN,yantar92@HIDDEN,
>>   64735 <at> debbugs.gnu.org
>> From: Dmitry Gutov<dmitry@HIDDEN>
>>
>>>> I wonder what scenario that might become apparent in. Launching many
>>>> small processes at once? Can't think of a realistic test case.
>>> One process suffices.  The effect might not be significant, but
>>> slowdowns due to new features are generally considered regressions.
>> We'd need some objective way to evaluate this. Otherwise we'd just stop
>> at the prospect of slowing down some process somewhere by 9ns (never
>> mind speeding others up).
> That could indeed happen, and did happen in other cases.  My personal
> conclusion from similar situations is that it is impossible to tell in
> advance what the reaction will be; we need to present the numbers and
> see how the chips fall.

I wrote this test:

(defun test-ls-output ()
   (with-temp-buffer
     (let ((proc
            (make-process :name "ls"
                          :sentinel (lambda (&rest _))
                          :buffer (current-buffer)
                          :stderr (current-buffer)
                          :connection-type 'pipe
                          :command '("ls"))))
       (while (accept-process-output proc))
       (buffer-string))))

And tried to find some case where the difference is the least in favor 
of high buffer length. The one in favor of it we already know (a process 
with lots and lots of output).

But when running 'ls' on a small directory (output 500 chars long), the 
variance in benchmarking is larger than any difference I can see from 
changing read-process-output-max from 4096 to 40960 (or to 40900 even). 
The benchmark is the following:

   (benchmark 1000 '(let ((read-process-output-fast t) 
(read-process-output-max 4096)) (test-ls-output)))

When the directory is a little large (output ~50000 chars), there is 
more nuance. At first, as long as (!) read_and_insert_process_output_v2 
patch is applied and read-process-output-fast is non-nil, the difference 
is negligible:

| read-process-output-max | bench result                        |
|                    4096 | (4.566418994 28 0.8000380139999992) |
|                   40960 | (4.640526664 32 0.8330555910000008) |
|                  409600 | (4.629948652 30 0.7989731299999994) |

For completeness, here are the same results for 
read-process-output-fast=nil (emacs-29 is similar, though all a little 
slower):

| read-process-output-max | bench result                        |
|                    4096 | (4.953397326 52 1.354643750000001)  |
|                   40960 | (6.942334958 75 2.0616055079999995) |
|                  409600 | (7.124765651 76 2.0892871070000005) |

But as the session gets older (and I repeat these and other 
memory-intensive benchmarks), the outlay changes, and the larger buffer 
leads to uniformly worse number (the below is taken with 
read-process-output-fast=t; with that var set to nil the results were 
even worse):

| read-process-output-max | bench result                        |
|                    4096 | (5.02324481 41 0.8851443580000051)  |
|                   40960 | (5.438721274 61 1.2202541989999958) |
|                  409600 | (6.11188183 77 1.5461468160000038)  |

...which seems odd given that in general, the buffer length closer to 
the length of the output should be preferable, because otherwise it is 
allocated multiple times, and read_process_output is likewise called 
more. Perhaps longer strings get more difficult to allocate as 
fragmentation increases?

So, the last table is from a session I had running from yesterday, and 
the first table was produced after I restarted Emacs about an hour ago 
(the numbers were stable for 1-2 hours while I was writing this email 
on-and-off, then started degrading again a little bit, though not yet -- 
a couple of hours since -- even halfway to the numbers in the last table).

Where to go from here?

- Maybe we declare the difference insignificant and bump the value of 
read-process-output-max, given that it helps in other cases,
- Or try to find out the cause for degradation,
- Or keep the default the same, but make it easier to use different 
value for different processes (meaning, we resurrect the discussion in 
bug#38561).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Sep 2023 01:26:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 15 21:26:35 2023
Received: from localhost ([127.0.0.1]:45112 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qhK4w-0000a1-UD
	for submit <at> debbugs.gnu.org; Fri, 15 Sep 2023 21:26:35 -0400
Received: from lists.gnu.org ([2001:470:142::17]:56812)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qhK4u-0000Zi-N9
 for submit <at> debbugs.gnu.org; Fri, 15 Sep 2023 21:26:33 -0400
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 <dmitry@HIDDEN>) id 1qhK4i-00021c-GV
 for bug-gnu-emacs@HIDDEN; Fri, 15 Sep 2023 21:26:20 -0400
Received: from wout5-smtp.messagingengine.com ([64.147.123.21])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dmitry@HIDDEN>) id 1qhK4f-0003bU-VL
 for bug-gnu-emacs@HIDDEN; Fri, 15 Sep 2023 21:26:20 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id 8492D320091A
 for <bug-gnu-emacs@HIDDEN>; Fri, 15 Sep 2023 21:26:14 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Fri, 15 Sep 2023 21:26:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :content-type:content-type:date:date:from:from:in-reply-to
 :message-id:mime-version:reply-to:sender:subject:subject:to:to;
 s=fm3; t=1694827573; x=1694913973; bh=SdGI/sXivr/Bm6TEtmwbQHn/9
 D9AGPCQdOVUfR48L78=; b=bJhrmA6/9vzWz0up4od2li6f1mpcaj8V0IKIl5t89
 oDXcG06Su9fW7E5B8aF8b1dYzYfxQb68/KHlzTyr6VkDvVBjsnSvA0rlIYjf1WoQ
 1F7wGrM5XrSu0M+Qg07iwoLop0EZk5tF/pzjvyvOmOYtLxEVExa0VIiPva/5VOEO
 QGBTISbAxyFTCKAAY+9k8j2cSyYHdu19ssS2uoOrjhMvhI0IZ/qQrbJjXj2Ms8b/
 iWTx6bsJO3X+qk/quZmHGBRDX0qaUttFBUIhreovWacvQlOy1b4n8kvYHboHgww+
 0JZD53je2Si4gf4Bttj+qlHOXL+RWtkXqLRKmFgqI/ZwQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:message-id
 :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1694827573; x=1694913973; bh=SdGI/sXivr/Bm6TEtmwbQHn/9D9AGPCQdOV
 UfR48L78=; b=GgZaUFFbGkGiH4pVQnQCkhwr7PgUCyxTV4cB9mN9baFxB8lPPfH
 MSqBBgvkpRKPc/9KVfLTrt9y5jBHcO13+ZoCxkqHLg8Um+7rawJELtkZVKy2F7IJ
 ilJMFWcqNhibiDoYfdLRZA0hJdTDZp4qxZfDJqoTiMCRn+g9YxdSZsieQ+o+D8nq
 sEzfppXXtkT6DSph2u0s2b/7wog3oPBPbd28LR+7j5rvF9ErmkqtI8nA/xk8rz8m
 GStzbX9WEQwW4JNIlzinjddpDwiKe8OOpMFAKxNm8Q7zFsiu0YwiN3dI2XTCeKM+
 DHKjyxsQkdFCgFpDMdrMFiRb2k/Xpghobcg==
X-ME-Sender: <xms:NQQFZbOTG7Pvc_4pI9mFTkwu6TpbVCUwhZMkM4aQYa5Zoc9vVLVtpQ>
 <xme:NQQFZV_RarQJRJ44o-LXz_WzhMDLVTW_kuJdd7n9ujKqb1wKXYs9vZ1FuJl0h_z82
 NLbXIZSwkZTyvupm_Y>
X-ME-Received: <xmr:NQQFZaTXiiZybWLikVbKiC6BcfBqdyBL9g6pkslOCflws2Dw7d7bgrzGNpjTBuI>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudejfedggeeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpegtkfffgggfvffhufesmhdtreertd
 efjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhv
 rdguvghvqeenucggtffrrghtthgvrhhnpeduteeijeeiveehveehtdehjefhtdevuedtie
 efffeivdeijeejvdevveegvdevvdenucffohhmrghinhepghhnuhdrohhrghenucevlhhu
 shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesgh
 huthhovhdruggvvh
X-ME-Proxy: <xmx:NQQFZfuU7m4ZKhGSAsAnjxtq6L1k255Yo_2UTw4h7pLM6DA07x8RgA>
 <xmx:NQQFZTe1FtNWdPxQlvqnr2znGSVqIOOBylOjVoBjSsygQ0xz0s2BEw>
 <xmx:NQQFZb0uFYldjoghP8JnGxlWdsH2SEqHrSY33KF82HRRYtpracQwdw>
 <xmx:NQQFZRoxTk0xaaRBNsfiClR6czMZa03XjibPZwSXQyctJhqh1WbAqA>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Fri, 15 Sep 2023 21:26:13 -0400 (EDT)
Content-Type: multipart/mixed; boundary="------------ujujwY71SxzZu4tHORIFXUna"
Message-ID: <3a6287c3-8458-663e-ffce-8f48b30bf73d@HIDDEN>
Date: Sat, 16 Sep 2023 04:26:11 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Content-Language: en-US
To: bug-gnu-emacs@HIDDEN
From: Dmitry Gutov <dmitry@HIDDEN>
Subject: [PATCH] Reduce GC churn in read_process_output
Received-SPF: pass client-ip=64.147.123.21; envelope-from=dmitry@HIDDEN;
 helo=wout5-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

This is a multi-part message in MIME format.
--------------ujujwY71SxzZu4tHORIFXUna
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

As suggested, I'm filing this in a new bug report for wider review.

The updated patch attached.

The previous discussion was in bug#64735, and the benchmarks (which more 
or less hold for the new patch as well) can be viewed here (last table): 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64735#506. Except the new 
version somehow performs a little better at read-process-output-max=4096 
as well, despite seemingly doing more.

Let me know if I DRYed this too much, or if there are better names for 
the extracted common routines, or etc. Or for the new variable 
(read-process-output-fast).
--------------ujujwY71SxzZu4tHORIFXUna
Content-Type: text/x-patch; charset=UTF-8;
 name="read_and_insert_process_output_v2.diff"
Content-Disposition: attachment;
 filename="read_and_insert_process_output_v2.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL3NyYy9wcm9jZXNzLmMgYi9zcmMvcHJvY2Vzcy5jCmluZGV4IDA4Y2I4
MTBlYzEzLi44ZWFkNTA4YjcyNiAxMDA2NDQKLS0tIGEvc3JjL3Byb2Nlc3MuYworKysgYi9z
cmMvcHJvY2Vzcy5jCkBAIC02MTEyLDYgKzYxMTIsMTEgQEAgcmVhZF9hbmRfZGlzcG9zZV9v
Zl9wcm9jZXNzX291dHB1dCAoc3RydWN0IExpc3BfUHJvY2VzcyAqcCwgY2hhciAqY2hhcnMs
CiAJCQkJICAgIHNzaXplX3QgbmJ5dGVzLAogCQkJCSAgICBzdHJ1Y3QgY29kaW5nX3N5c3Rl
bSAqY29kaW5nKTsKIAorc3RhdGljIHZvaWQKK3JlYWRfYW5kX2luc2VydF9wcm9jZXNzX291
dHB1dCAoc3RydWN0IExpc3BfUHJvY2VzcyAqcCwgY2hhciAqYnVmLAorCQkJCSAgICBzc2l6
ZV90IG5yZWFkLAorCQkJCXN0cnVjdCBjb2Rpbmdfc3lzdGVtICpwcm9jZXNzX2NvZGluZyk7
CisKIC8qIFJlYWQgcGVuZGluZyBvdXRwdXQgZnJvbSB0aGUgcHJvY2VzcyBjaGFubmVsLAog
ICAgc3RhcnRpbmcgd2l0aCBvdXIgYnVmZmVyZWQtYWhlYWQgY2hhcmFjdGVyIGlmIHdlIGhh
dmUgb25lLgogICAgWWllbGQgbnVtYmVyIG9mIGRlY29kZWQgY2hhcmFjdGVycyByZWFkLApA
QCAtNjIyNyw3ICs2MjMyLDExIEBAIHJlYWRfcHJvY2Vzc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E5vbi1u
aWwgdG8gb3B0aW1pemUgdGhlIGluc2VydGlvbiBvZiBwcm9jZXNzIG91dHB1dC4KK1dlIHNr
aXAgY2FsbGluZyBgaW50ZXJuYWwtZGVmYXVsdC1wcm9jZXNzLWZpbHRlcicgYW5kIGRvbid0
IGFsbG9jYXRlCit0aGUgTGlzcCBzdHJpbmcgdGhhdCB3b3VsZCBiZSB1c2VkIGFzIGl0cyBh
cmd1bWVudC4gIE9ubHkgYWZmZWN0cyB0aGUKK2Nhc2Ugb2YgYXN5bmNocm9ub3VzIHByb2Nl
c3Mgd2l0aCB0aGUgZGVmYXVsdCBmaWx0ZXIuICAqLyk7CisgIHJlYWRfcHJvY2Vzc19vdXRw
dXRfZmFzdCA9IFF0OworCiAgIERFRlZBUl9JTlQgKCJwcm9jZXNzLWVycm9yLXBhdXNlLXRp
bWUiLCBwcm9jZXNzX2Vycm9yX3BhdXNlX3RpbWUsCiAJICAgICAgZG9jOiAvKiBUaGUgbnVt
YmVyIG9mIHNlY29uZHMgdG8gcGF1c2UgYWZ0ZXIgaGFuZGxpbmcgcHJvY2VzcyBlcnJvcnMu
CiBUaGlzIGlzbid0IHVzZWQgZm9yIGFsbCBwcm9jZXNzLXJlbGF0ZWQgZXJyb3JzLCBidXQg
aXMgdXNlZCB3aGVuIGEK

--------------ujujwY71SxzZu4tHORIFXUna--




Acknowledgement sent to Dmitry Gutov <dmitry@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#66020; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 11 Jun 2024 20:30:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.