bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44007: 26.3; Strange shell mode performance


From: Herman
Subject: bug#44007: 26.3; Strange shell mode performance
Date: Sun, 5 Nov 2023 17:46:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1

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 <geza.herman@gmail.com>
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.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]