From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71355: 30.0.50; [PATCH] Improve performance of buffered output in Eshell Date: Wed, 05 Jun 2024 19:51:39 +0300 Message-ID: <8634prjpt0.fsf@gnu.org> References: <22b0dc8f-11dc-5fd2-c75d-88c17580d28d@gmail.com> <848772e9-5ef0-8a8a-decd-c0b79366ec27@gmail.com> <86ikynk30i.fsf@gnu.org> <037ebce9-93af-f1ad-67d9-550fd1074294@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33148"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71355@debbugs.gnu.org, stefankangas@gmail.com To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 05 18:53:09 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sEtsq-0008Kl-5u for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jun 2024 18:53:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEtsX-0004En-BL; Wed, 05 Jun 2024 12:52:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEtsW-0004EO-8m for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 12:52:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEtsV-0004lA-W6 for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 12:52:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sEtsj-0001v5-Vs for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 12:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jun 2024 16:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71355 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71355-submit@debbugs.gnu.org id=B71355.17176063267241 (code B ref 71355); Wed, 05 Jun 2024 16:53:01 +0000 Original-Received: (at 71355) by debbugs.gnu.org; 5 Jun 2024 16:52:06 +0000 Original-Received: from localhost ([127.0.0.1]:48366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEtrq-0001si-1n for submit@debbugs.gnu.org; Wed, 05 Jun 2024 12:52:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEtrn-0001rs-Ij for 71355@debbugs.gnu.org; Wed, 05 Jun 2024 12:52:04 -0400 Original-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 ) id 1sEtrT-0004cL-Tl; Wed, 05 Jun 2024 12:51:43 -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=jeSrAJC+FarLcQVbFeycty+im9P3ROd2bKEf+OAp7sw=; b=b0bj53p4AZvK rL9Px1txvp51YYfqDV64j1wjWRqwO39CtE6eIaKRBcFA2BYmIxWVJWfnlmoSi1XQ1T5+c8Qr+EqMh +roiFGN63G4C5+V3Y3EfF8U8r6ilduQvgmcjoqFWE52iV7RspEc743UGiUeOagVxHFbjtTAHjBfze Y298kQIbnQfd99CRkMc+iOvXpWMdl33B0w04T2fLC5RrYYXmM7pAZsG/bgz8PTN2dspybNIfaVGvN I8w7OcBkFX0oP9oXSr/gIvA8+itBuAsnp6rQqLQRB3nLBPI2WLsaIU0QeOMafKSGqoUgdhwVm3CXG K4s6h3vDjYQiPY2vhl+h7A==; In-Reply-To: <037ebce9-93af-f1ad-67d9-550fd1074294@gmail.com> (message from Jim Porter on Wed, 5 Jun 2024 09:42:43 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286619 Archived-At: > Date: Wed, 5 Jun 2024 09:42:43 -0700 > Cc: 71355@debbugs.gnu.org, stefankangas@gmail.com > From: Jim Porter > > On 6/5/2024 5:06 AM, Eli Zaretskii wrote: > > Is 2K indeed the optimal size? It is about 25 80-column lines, which > > is quite a lot. "Normal" shells send output to the screen in smaller > > chunks. How about 128 instead? or maybe some small multiple of the > > line length, like 1 or 2? > > Yes, I believe 2k is the optimal size, or close to it. Trying a value of > 128 results in basically no change in performance from baseline. That > makes sense to me, since 128 is actually fairly close to the old value > for this buffering (which was five *lines*[1]; the old code measured > this differently). That's strange, because I see no output at all until all of it is available and showsn, and I thought you said the same in your OP? > In starting on this work, I compared to the amount of data that I get > each time a child process filter is called; that's normally 4095 bytes > in my tests. Then I started a bit lower (512) and gradually doubled the > buffer size until I was able to get most of the performance benefit. So why do I see only all of it, in one go? I see this both on Windows and on GNU/Linux, btw.