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: Sun, 5 Nov 2023 17:46:15 +0100 Message-ID: <1cfcee64-0002-dedd-fb8f-528660e7c807@gmail.com> References: <499ab53f-7c23-b5ed-6105-3072fffb4bfe@gmail.com> <83imbby3yt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37980"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Cc: 44007@debbugs.gnu.org To: Eli Zaretskii , Herman@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 05 17:47:50 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 1qzgHt-0009fu-L5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Nov 2023 17:47:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzgHZ-0001Ps-BP; Sun, 05 Nov 2023 11:47:29 -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 1qzgHW-0001Pb-CK for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 11:47:27 -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 1qzgHW-0000Kw-4W for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 11:47:26 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qzgI6-0000Ma-GY for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 11:48: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: Sun, 05 Nov 2023 16:48: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.16992028231315 (code B ref 44007); Sun, 05 Nov 2023 16:48:02 +0000 Original-Received: (at 44007) by debbugs.gnu.org; 5 Nov 2023 16:47:03 +0000 Original-Received: from localhost ([127.0.0.1]:38098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzgH8-0000L9-Kq for submit@debbugs.gnu.org; Sun, 05 Nov 2023 11:47:02 -0500 Original-Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:58498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzgH6-0000Ke-Jv for 44007@debbugs.gnu.org; Sun, 05 Nov 2023 11:47:01 -0500 Original-Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40906fc54fdso28748935e9.0; Sun, 05 Nov 2023 08:46:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699202778; x=1699807578; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=32t0Po9Ulh1VcfzoMBwF5N8Wt29afvxZFW00XF7kqcY=; b=XTASvNj5YiEwIOqmr4XAoiITEYWPQEzvbzVh/0Ke1eNm+wtytSflo9JEU5ZzLf7/h6 De0yxqLBUzHAsr6TIsS0C1i5ocN6ScIx5+TxtgfZeqHdg/o+rESDtd//qBQK2m23NfN8 zStgNFlY8qbaRqmI5hwfigjIZvHHaiwZTyhLUGtAWiAQDWrMmwRzs9bzHiHq/m0t47x4 OARneBJ/D8SmHnq3K2nhT+VKiS6Rmh71SZIIYlrKYsaXQXtF44wR7YOBmReJCzHaAT1U UCh60HsYvzO1yc9f7DBe7GnBy5HqChOca47xIfRyhqnT8yBmcQYQb+gLCZUAsXt9jxKp katQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699202778; x=1699807578; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=32t0Po9Ulh1VcfzoMBwF5N8Wt29afvxZFW00XF7kqcY=; b=TOthi2b4Ky8cBB/1U5+7X/RP8Ip6vZfvXBMainhJIFxrZbl5iej4S7jyxjXqukInXb a1j8zQHyVZWebeDZxh0gT8u6kVpXQwP/GQBV7iWUbSEkRPjjsuxIzOfbJ7b+ugRxYCQx /CmMEcsZOO1EPf0KkH4pFznv+J702CgInZuxidF+fJKsa1f9G8o9DlXiFusajoLG//nx CvcydXwExvvbqQCSZ5zNb1Fo+5wOEmxaJDBpVtCJgaNzxAxUeoP857WgVnDMnR6s3eHD vKBI4bO0YaXLPyXWiJwfzq4jprZLD1KJVWsMKqTlbL2RdwyJnDxARkPIekANWGR9aRPw H5iQ== X-Gm-Message-State: AOJu0YzKnNWxWT0mdgaaN743+jkCxwx1tPy220porTk4cWPMD+NaRPCr yWQ0d3D5R5QGu6ZP9IjrUYc= X-Google-Smtp-Source: AGHT+IEBlqFiiPxBTfG/UQJBoPv1ic7fckSIiJLUE+ZntvKUZVusnht8/ninBUmL1M9S6EZBQMK8ZQ== X-Received: by 2002:a05:600c:a0a:b0:409:5580:bc9f with SMTP id z10-20020a05600c0a0a00b004095580bc9fmr12238106wmp.34.1699202777612; Sun, 05 Nov 2023 08:46:17 -0800 (PST) Original-Received: from [192.168.8.4] (netacc-gpn-34-149-169.pool.yettel.hu. [37.234.149.169]) by smtp.gmail.com with ESMTPSA id du15-20020a05600c634f00b00405959bbf4fsm9192259wmb.19.2023.11.05.08.46.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Nov 2023 08:46:17 -0800 (PST) Content-Language: sv-FI In-Reply-To: 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:273833 Archived-At: I think I found another thing which is needed: tty echo must be enabled. With bash, echo is disabled by default, so the issue doesn't happen. With zsh, echo is enabled by default, and the issue happens (I'm not sure why zsh turns on echo). So either one has to use zsh to repro the issue, or use these updated steps: 1. emacs -Q 2. M-x shell RET 3. stty echo 4. seq 100000 With echo disabled, "seq 100000" takes ~0.2 sec. With echo enabled, it takes 3 sec (and pressing RET immediately after executing seq makes it fast). On 10/15/20 16:34, Herman, Geza wrote: > Sure! > > 1. execute emacs by "emacs -Q" > 2. M-x shell RET > 3. in the shell, execute "seq 100000" (or cat a large file) > 4. immediately after you hit enter on "seq 100000" press enter again > > It doesn't reproduce 100% unfortunately. It seems that if it doesn't > reproduce, you need to start from step 1., so it has a higher chance > to happen. > > Another strange thing is that enter can have the opposite effect as > well: if I press it during "seq 100000" several times (not immediately > after "seq 100000", but after ~1 sec), it can make seq slower. Instead > of the usual 3-4 sec, it slows down to >10 sec. > (I measured by "time seq 100000"). It seems that the more enter I > press, the slower it gets. But maybe it's a different issue. > > On 2020-10-15 16:10, Eli Zaretskii wrote: >>> From: Herman@debbugs.gnu.org, Géza >>> Date: Thu, 15 Oct 2020 11:53:16 +0200 >>> >>> I'm experiencing strange shell (comint) mode performance. If I cat a 10 >>> MB file, it takes 1:20 to cat it. Emacs uses only 30% cpu. But, if I >>> press enter after I send the cat command, it speeds up, and it only >>> takes 8 sec (emacs cpu usage goes up to 100%). >>> >>> Same thing: if I execute "seq 100000" in a small emacs window, it takes >>> ~3 seconds. But, if I press enter after executing seq, it takes only >>> 0.4 >>> sec (this is not 100% reproducible, sometimes pressing enter doesn't >>> make a difference). >>> (I executed comint-clear-buffer before measurements) >> Can you please describe a detailed reproduction recipe, starting from >> "emacs -Q"?  It is not exactly clear from the above whether you do >> this in a shell-mode buffer or in some other mode, where exactly do >> you press Enter, etc.  A detailed recipe will resolve all those >> unclear aspects. >> >> Thanks. >