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#73046: 29.4; Emacs 100% CPU usage for several seconds when opening dired buffer over TRAMP Date: Sat, 14 Sep 2024 09:24:07 +0300 Message-ID: <86y13uiwhk.fsf@gnu.org> References: <87o75241qh.fsf@gmail.com> <86plpi2ixa.fsf@gnu.org> <87seudke20.fsf@gmail.com> <8634md2vc2.fsf@gnu.org> <87h6asrk42.fsf@gmx.de> <86a5gk28ht.fsf@gnu.org> <87le0450x8.fsf@gmx.de> <865xr8228d.fsf@gnu.org> <87jzfofzcl.fsf@gmail.com> <8634mc1ty0.fsf@gnu.org> <87h6asl3hl.fsf@gmail.com> <86ttesyo1t.fsf@gnu.org> <87bk0zjzt1.fsf@gmx.de> <86a5gjy02i.fsf@gnu.org> <87wmjn2wq5.fsf@gmail.com> <87seuaids7.fsf@gmx.de> <86frqaweo2.fsf@gnu.org> <87a5gigo9b.fsf@gmx.de> <86cylew3tr.fsf@gnu.org> <87r09sexp0.fsf@gmx.de> <87cyl7rvn3.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15613"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael.albinus@gmx.de, 73046@debbugs.gnu.org To: Suhail Singh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 14 08:25:07 2024 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 1spMDS-0003xd-PL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Sep 2024 08:25:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1spMDH-0003bg-8M; Sat, 14 Sep 2024 02:24:55 -0400 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 1spMDE-0003Pp-3e for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 02:24:52 -0400 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 1spMDD-0001zo-RT for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 02:24:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=/qGbD0bH+20hagpjztwXw1WCGC+CqUiboJtAHYQEoOE=; b=tEBrw865uR4TaqLfFv+ELdmEL0ei0QMkQ5pgiSX33EWi3x6PEv7r+EqunG6myEZ+TqoaQybWnCCz6pjg8VqSs7YLkk+1qOGmiXboCVZfeIMYHQfw4SsSUhqS5KDQkrqMfojdiZGbyTT/dxSzDNZmDmS1cTZo8ogy/34Fnc+ihUKQ8xFsV2C3KUQgKORqr31+qXOTpHLZkpPmYzFpqOhWh9zsZXYUzcKguSMheMqnrKRD4xY2R8lw5v4BKdnAQu5H6P5O52cZ2uAFxNQNQSgTilgzZs2hwYBjZgIjjdSqGFqmZQcU3aWp6Su6gZRLoVopeheRJNVJv0/KRNpIwWwoPA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1spMDN-00072i-MX for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 02:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Sep 2024 06:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73046 X-GNU-PR-Package: emacs Original-Received: via spool by 73046-submit@debbugs.gnu.org id=B73046.172629506827014 (code B ref 73046); Sat, 14 Sep 2024 06:25:01 +0000 Original-Received: (at 73046) by debbugs.gnu.org; 14 Sep 2024 06:24:28 +0000 Original-Received: from localhost ([127.0.0.1]:44550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spMCq-00071d-6y for submit@debbugs.gnu.org; Sat, 14 Sep 2024 02:24:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spMCo-00071O-Ci for 73046@debbugs.gnu.org; Sat, 14 Sep 2024 02:24:27 -0400 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 1spMCY-0001yM-Ft; Sat, 14 Sep 2024 02:24:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/qGbD0bH+20hagpjztwXw1WCGC+CqUiboJtAHYQEoOE=; b=auNqcoBOQOIl 5kwLtxfKUu9kQPQ9Mvu/zN87XfHx9dFFuljR3c4mvhAykWHA9dQeyXTle/wVSdJ3l+fUDNF8c9R1m RNDYfV5qmgnzt8ZmONMdz7N0hMZEzYvEPwFHEOiIOZockU6SUrtss2kXvRWteiwuh+XaKe6kEsT/o 3VbaxB1P52kaYx+nNiL0/jLCXHDMusNqj6Ag90OW6KguzauPaFWWaW79GTUEzrDmIUUTdY0by1DZp gfuSQ/Y4aBGWEKdXg1sonqjsav9BNLTZl09OmCSCxSDUlDBXKNV9TALmsxZAVmJYzYUb/PRYoFfUX JPPx0u3mLrAPZUgyhNGXFw==; In-Reply-To: <87cyl7rvn3.fsf@gmail.com> (message from Suhail Singh on Fri, 13 Sep 2024 19:17:36 -0400) 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:291683 Archived-At: > From: Suhail Singh > Cc: Eli Zaretskii , suhailsingh247@gmail.com, > 73046@debbugs.gnu.org > Date: Fri, 13 Sep 2024 19:17:36 -0400 > > Michael Albinus writes: > > > I've added (sit-for 0.005) in the loop calling > > tramp-accept-process-output. It decreases the CPU load from 100% to > > something between 45..50%, when waiting for a response from > > remote. Pushed to master > > I tested this patch today atop TRAMP 2.7.1.2. Some findings: > > 1. If directory with symlinks on remote host with slow connection is > opened CPU usage is much less than 100%. That's the good news. > However, there are a couple of caveats. > > 2. If we are in parent directory, and soon after pressing RET we invoke > M-x we don't see the minibuffer prompt till after the offending > directory has finished font-locking. > > 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). > > Thoughts? Are 2 and 3 new with this patch, or were they present in the previous code as well? And what do you expect to happen when you press M-x while Emacs is still busy performing your previous command? Having the visual response delayed until the previous command finishes is normal Emacs behavior, being a single-threaded program which executes commands one by one in the same thread.