GNU bug report logs - #75922
CPU hogs with pgtk

Previous Next

Package: emacs;

Reported by: Nicolas Sarlin <nico.sarlin <at> gmail.com>

Date: Wed, 29 Jan 2025 11:16:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nicolas Sarlin <nico.sarlin <at> gmail.com>
Cc: 75922 <at> debbugs.gnu.org
Subject: bug#75922: CPU hogs with pgtk
Date: Wed, 29 Jan 2025 18:35:06 +0200
> From: Nicolas Sarlin <nico.sarlin <at> gmail.com>
> Date: Wed, 29 Jan 2025 17:02:16 +0100
> Cc: 75922 <at> debbugs.gnu.org
> 
> On Wed, 29 Jan 2025 at 14:06, Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > The profile says most of the time is spent in sit-for called from
> > lsp-request-while-no-input.  First, sit-for is not supposed to consume
> > CPU, because it's a waiting function.  Are you sure this profile was
> > taken when Emacs was hogging CPU?
> >
> > And second, lsp-mode is not part of Emacs, so if indeed the above is a
> > profile representative of high CPU load, I suggest to report this to
> > the developers of lsp-mode first, even though the problem appears only
> > in the PGTK build.
> >
> > Thanks.
> 
> Hi, thank you for your answer.
> Yes, this profile was collected during an emacs freeze. It took me a
> few second (maybe 10) after `profiler-start` to trigger the freeze,
> then again a few seconds of freeze, then I ran `profiler-stop`
> directly after. During the freeze I had one CPU core constantly
> running at 100%.

But maybe the process which was consuming the CPU at that time was not
Emacs?  Because sit-for should not consume CPU, it just waits for some
input (or for timeout).  Is it possible that while Emacs waited, some
other process, perhaps the LSP server itself, was spinning the CPU?




This bug report was last modified 159 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.