unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Suhail Singh <suhailsingh247@gmail.com>
Cc: 73046-done@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#73046: 29.4; Emacs 100% CPU usage for several seconds when opening dired buffer over TRAMP
Date: Sat, 21 Sep 2024 10:30:28 +0200	[thread overview]
Message-ID: <87bk0hquhn.fsf@gmx.de> (raw)
In-Reply-To: <87cykys5gy.fsf@gmx.de> (Michael Albinus's message of "Fri, 20 Sep 2024 17:35:41 +0200")

Version: 31.1

Michael Albinus <michael.albinus@gmx.de> writes:

Hi Suhail,

>> On a related, but distinct note, thoughts on whether there's a
>> relatively straightforward way to address "3" below (from one of the
>> other exchanges in this thread)?
>>
>>>> >> 3. If after invoking M-x we immediately start typing, the keyboard input
>>>> >>    is registered, however, it doesn't display in the minibuffer till
>>>> >>    after the offending directory has finished font-locking.
>>>> >>    Additionally, doing so invariably results in 100% CPU usage for the
>>>> >>    duration of the font-locking.  Sometimes invoking M-x alone results
>>>> >>    in CPU usage going back up to 100% (while font-locking is still being
>>>> >>    done).
>>>>
>>>> > And what do you expect to happen when you press M-x while Emacs is
>>>> > still busy performing your previous command?
>>>>
>>>> I did not expect 3 to happen.  I.e., wrt 3 my expectation was that
>>>> invoking M-x and typing doesn't result in a noticable increase in CPU
>>>> usage for the duration of the font-locking.
>>>
>>> If 3 surprised you, then the reason is simple: sit-for returns
>>> immediately if any input is available, so typing effectively disables
>>> the wait.  This could be countermanded by unconditional sleep, but
>>> AFAIU Michael is rethinking the whole issue, so we should wait for him
>>> to reach his conclusions.
>
> This would mean to use (sleep-for 0) instead of (sit-for 0), right? Hmm,
> I might try the same tests for this clause next days, no idea whether it
> makes a difference.
>
> But ATM, we should use (sit-for 0), until we know better.

I've tried (sleep-for 0), but this doesn't help. CPU load is always 100%,
even if there is no input.

So I've pushed (sit-for 0) to master. Unless Eli has a better proposal,
I'm done with this.

It will also be available in Tramp 2.7.1.3, scheduled for release on GNU
ELPA end of this month.

Closing the bug.

Best regards, Michael.





  parent reply	other threads:[~2024-09-21  8:30 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 14:24 bug#73046: 29.4; Emacs 100% CPU usage for several seconds when opening dired buffer over TRAMP Suhail Singh
2024-09-05 15:56 ` Eli Zaretskii
2024-09-05 21:04   ` Suhail Singh
2024-09-06  5:40     ` Eli Zaretskii
2024-09-06 13:23       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-06 13:54         ` Eli Zaretskii
2024-09-06 14:09           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-06 16:09             ` Eli Zaretskii
2024-09-06 17:47               ` Suhail Singh
2024-09-06 19:08                 ` Eli Zaretskii
2024-09-07  0:19                   ` Suhail Singh
2024-09-07  1:39                     ` Suhail Singh
2024-09-07  6:29                     ` Eli Zaretskii
2024-09-07  8:07                       ` Suhail Singh
2024-09-07 14:36                       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-07 15:07                         ` Eli Zaretskii
2024-09-07 17:35                           ` Suhail Singh
2024-09-08 11:30                             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-08 11:47                               ` Eli Zaretskii
2024-09-08 15:26                                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-08 15:41                                   ` Eli Zaretskii
2024-09-08 16:46                                     ` Suhail Singh
2024-09-08 17:53                                       ` Eli Zaretskii
2024-09-10  8:10                                     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-11  1:05                                       ` Suhail Singh
2024-09-11 11:50                                         ` Eli Zaretskii
2024-09-11 16:29                                           ` Suhail Singh
2024-09-11 16:38                                             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-11 17:25                                               ` Suhail Singh
2024-09-12 11:48                                                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-11 14:13                                         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-11 15:56                                           ` Suhail Singh
2024-09-13 23:17                                       ` Suhail Singh
2024-09-14  6:24                                         ` Eli Zaretskii
2024-09-14 14:25                                           ` Suhail Singh
2024-09-14 14:41                                             ` Suhail Singh
2024-09-14 15:03                                             ` Eli Zaretskii
2024-09-14 22:36                                               ` Suhail Singh
2024-09-15  5:55                                                 ` Eli Zaretskii
2024-09-15 14:23                                                   ` Suhail Singh
2024-09-20  9:54                                               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-20 10:47                                                 ` Eli Zaretskii
2024-09-20 14:18                                                 ` Suhail Singh
2024-09-20 15:35                                                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-20 15:42                                                     ` Suhail Singh
2024-09-21  8:30                                                     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-09-21 14:06                                                       ` Suhail Singh
2024-09-14  7:07                                         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-14 14:39                                           ` Suhail Singh
2024-09-20  8:48                                             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-11 14:06                         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-07 14:22                     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-07 17:58                       ` Suhail Singh
2024-09-08 11:26                         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-08 15:09                           ` Suhail Singh
2024-09-08 15:19                             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-08 15:34                               ` Suhail Singh
2024-09-08 16:35                                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-11 16:19                                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-06 16:56             ` Suhail Singh
2024-09-06 16:01         ` Suhail Singh
2024-09-06 15:46       ` Suhail Singh
2024-09-06 15:52       ` Suhail Singh
     [not found] <87v7yz1sw8.fsf@rutgers.edu>
2024-09-13 15:47 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-20 16:05   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-20 17:11     ` Jake Nelson via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-21  6:59       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bk0hquhn.fsf@gmx.de \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73046-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=suhailsingh247@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).