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#44007: 26.3; Strange shell mode performance Date: Mon, 06 Nov 2023 15:22:28 +0200 Message-ID: <83jzqv2ezv.fsf@gnu.org> References: <499ab53f-7c23-b5ed-6105-3072fffb4bfe@gmail.com> <83imbby3yt.fsf@gnu.org> <1cfcee64-0002-dedd-fb8f-528660e7c807@gmail.com> <83v8af2iey.fsf@gnu.org> <87bkc73uk4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7014"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44007@debbugs.gnu.org To: Herman =?UTF-8?Q?G=C3=A9za?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 06 14:23:52 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qzza4-0001aD-Kn for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Nov 2023 14:23:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzzZe-0000tc-U5; Mon, 06 Nov 2023 08:23:26 -0500 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 1qzzZd-0000s5-F7 for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2023 08:23:25 -0500 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 1qzzZd-0001QH-6H for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2023 08:23:25 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qzzaE-00023E-2W for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2023 08:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Nov 2023 13:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44007 X-GNU-PR-Package: emacs Original-Received: via spool by 44007-submit@debbugs.gnu.org id=B44007.16992770097830 (code B ref 44007); Mon, 06 Nov 2023 13:24:02 +0000 Original-Received: (at 44007) by debbugs.gnu.org; 6 Nov 2023 13:23:29 +0000 Original-Received: from localhost ([127.0.0.1]:38883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzzZg-00022D-Tg for submit@debbugs.gnu.org; Mon, 06 Nov 2023 08:23:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzzZe-00021z-8r for 44007@debbugs.gnu.org; Mon, 06 Nov 2023 08:23:27 -0500 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 1qzzYx-0001M4-Cj; Mon, 06 Nov 2023 08:22:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=QHRN9Kjn7nlPQX3Vmqpeig63weVUHuUP0K3fkoQxJW4=; b=ah2TrcshtG5kahNT93qR QtHarj2vJYzaEAIl0/wUEQ1Q8E5jtLocTj8iqu3sH3cKEfCehWBiFZPkK9Vd/Ru1nEEoF6/k8VwgV OTHQKRD2GlTjg+GzRFVUf2H7wk0Muv8c29KcLpWZIfFyxLtGEiutblEWzwzNX2nAEBUcFuHNqDDZd H2i8816CsxmFHx+u2xvY+WhqB11z5fa7bPZr3hhQd58gcGlvMO8C7dsasy5KBT+TLuItb8PiQOOmk hGkmg+yJvdBrJLMiEEqBSUcQcE6ikyKcDgvAe/yRCBwu0MjBLGAqY6rNfRLxuoWeU0OqB1TGFfpQL yaTfiZAAJ832bQ==; In-Reply-To: <87bkc73uk4.fsf@gmail.com> (message from Herman, =?UTF-8?Q?G=C3=A9za?= on Mon, 06 Nov 2023 13:28:15 +0100) 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:273872 Archived-At: > From: Herman, Géza > Cc: Herman Géza , > 44007@debbugs.gnu.org > Date: Mon, 06 Nov 2023 13:28:15 +0100 > > > Eli Zaretskii writes: > > > I'm not sure what exactly are we trying to do here. AFAIU, at > > least 2 > > variables were discovered that can speed up this example, so > > what else > > has to be done? Is there any bug here, and if so, what is the > > bug? > > The bug is that if echo is enabled, emacs 'shell' gives a much > worse performance. I'm trying to understand why would we consider that a bug. There will always be ways to make Lisp programs run slower or faster by tweaking some variables, and the defaults are not always capable of providing the best performance in every possible situation. > And it has no apparent reason why it should be the case. You (or anyone else) should of course feel free to investigate and try to find out what are the specific reasons which make Emacs slower in some cases and faster in others. But that doesn't necessarily constitutes a bug, IMO. > I'd like to also mention that my hacky solution not just fixes the > problem, but also improves shell's performance, even with the > mentioned variables set. As far as I know POSIX programming, > read() should always be called in a loop, if one wants to read N > bytes (even in the successful case). Emacs doesn't have this in > emacs_intr_read, that causes the problem. We've arrived at the current code after a lot of iterations, and it has to handle many different uses. It doesn't surprise me a bit that you can find a change which speeds up Emacs in some particular case, but what about all the other cases? How about if you run with this change for a few weeks or so, and see if it doesn't cause problems elsewhere? maybe also others will try using it in their use patterns and report back. Then we will at least have some data regarding the effects of the change you propose. Of course, if someone comes with a less hacky proposal, it would be even better. Also, please be sure to try Emacs 30, as I believe some changes were done there recently. Thanks.