From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Newsgroups: gmane.emacs.bugs Subject: bug#44007: 26.3; Strange shell mode performance Date: Mon, 06 Nov 2023 13:28:15 +0100 Message-ID: <87bkc73uk4.fsf@gmail.com> References: <499ab53f-7c23-b5ed-6105-3072fffb4bfe@gmail.com> <83imbby3yt.fsf@gnu.org> <1cfcee64-0002-dedd-fb8f-528660e7c807@gmail.com> <83v8af2iey.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40869"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.11.19; emacs 30.0.50 Cc: 44007@debbugs.gnu.org, Herman =?UTF-8?Q?G=C3=A9za?= To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 06 14:02:14 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 1qzzF8-000AQi-3q for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Nov 2023 14:02:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzzER-0006x5-Lg; Mon, 06 Nov 2023 08:01:32 -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 1qzzEL-0006qK-Fp for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2023 08:01: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 1qzzEL-0004mN-7B for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2023 08:01:25 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qzzEw-0001YZ-FR for bug-gnu-emacs@gnu.org; Mon, 06 Nov 2023 08:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Nov 2023 13:02: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.16992757085950 (code B ref 44007); Mon, 06 Nov 2023 13:02:02 +0000 Original-Received: (at 44007) by debbugs.gnu.org; 6 Nov 2023 13:01:48 +0000 Original-Received: from localhost ([127.0.0.1]:38864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzzEh-0001Xu-Ic for submit@debbugs.gnu.org; Mon, 06 Nov 2023 08:01:47 -0500 Original-Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:44267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzzEf-0001Xf-LQ for 44007@debbugs.gnu.org; Mon, 06 Nov 2023 08:01:46 -0500 Original-Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40837ebba42so27991385e9.0 for <44007@debbugs.gnu.org>; Mon, 06 Nov 2023 05:01:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699275662; x=1699880462; darn=debbugs.gnu.org; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=8E7RDN12NE8nDZERrYpBJa3HybC9cr8qa5PhpzGLsr4=; b=XMg4bfl9Mr6e7fkdQxw8m9P0er1JPb79yCg2dpUNa96nDedItV8A8wyiyuwnA0tqfu m7Vr0TKvYGvdv4iDZ75VUujM+TWwR/CM11LOLVVf7qr8flTfSRr1pCCy2euLaD6r3lbR CokKLw5Nuz4umZRoYE5MyMGsXTMHwAx9Aqzr7J/9usbpjz8siD04TylSbDsai6Pq230s 7oJFPaY/HhulMXSQC58M5JBst5L8aevHUFO8puXr4qsx/hH6fqlAYX7T5WaD1XhUr4M7 Jmv+vt/TWqwAq8OhRmjCkXo1kt1YUpPN/TSalYpYRFbfSfStOB7a60unWdzBj1pgJKOu QZeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699275662; x=1699880462; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8E7RDN12NE8nDZERrYpBJa3HybC9cr8qa5PhpzGLsr4=; b=MiTZ7JWRSYzVIfFvaEGJIPAm+CbL4C0o8fkB/caNOh7lFEed7g9TFm79QbsyvLlZRz 5nQdpHPtHRz/2VDf183LW7L+55zXucZfnoDphCxMeENreTYoTgV0vSuXOtFe5ZdD8tji cPiXDoUflJhTclB6t/lPhGHMVGT3tO0F73drUXuuDrcAqbXSO2Ioygbk07P9MgGSlY7u +B7zuJF3PokmMbxVFkSCjfY/6fhbGKnT0wKaan/KBqUbNnI6nzelFpA327M1ESn3iNnY YpDFLECWZd0WoTXDYourFyG95cSNgdsL/U2+LZVW28b45N+JG6WaKhLW4pvz/U40vTJU NHbw== X-Gm-Message-State: AOJu0YwIAklHH8ZbSho+ksoSnyp8L0permmM5R1KIRxVXpDeEF7buZq7 YRcnuDZTv5ZA7+pTSfMEnvQ= X-Google-Smtp-Source: AGHT+IHdCiYejZ4aqlFYn7SXbOUBfUB8S4UKw1Q87PofqYerTHQt5dUw51FZXNWsaeNphQ84sl1PJg== X-Received: by 2002:a05:600c:4708:b0:408:434c:dae7 with SMTP id v8-20020a05600c470800b00408434cdae7mr26451952wmo.2.1699275662210; Mon, 06 Nov 2023 05:01:02 -0800 (PST) Original-Received: from localhost (netacc-gpn-34-149-169.pool.yettel.hu. [37.234.149.169]) by smtp.gmail.com with ESMTPSA id gw21-20020a05600c851500b004064741f855sm11905895wmb.47.2023.11.06.05.01.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 05:01:01 -0800 (PST) In-reply-to: <83v8af2iey.fsf@gnu.org> 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:273871 Archived-At: 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. And it has no apparent reason why it should be the case. Also, there is weird behavior around event handling (why does a RET speed up I/O?). I think that this behavior suggests that there is some bug in Emacs. At least I don't consider this a normal behavior. I don't think that the solution is that zsh users should set these variables. It makes much more sense to fix Emacs so this doesn't happen in the first place. 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.