unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Yuri D'Elia <wavexx@thregr.org>
Cc: 51692@debbugs.gnu.org, David Koppelman <koppel@ece.lsu.edu>,
	Zhiwei Chen <condy0919@gmail.com>,
	Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#51692: 29.0.50; High CPU in c++ mode. Type finder?
Date: Fri, 12 Nov 2021 19:08:43 +0000	[thread overview]
Message-ID: <YY67u9X3f3fk4xdv@ACM> (raw)
In-Reply-To: <874k8hpulf.fsf@wavexx.thregr.org>

Hello, Yuri.

On Fri, Nov 12, 2021 at 10:47:46 +0100, Yuri D'Elia wrote:
> On Thu, Nov 11 2021, Alan Mackenzie wrote:
> > Yes, there is a bug here.  CC Mode is expected to use a high amount of
> > CPU time (but not 100%) for a few seconds after starting C (etc.) Mode,
> > or for a few minutes after starting Emacs when there's a desktop with a
> > lot of CC Mode files in it.

> > However, with C++ files (and likely Java files, too), a problem with
> > templates caused this 100% usage.

> High-burst is not a problem, however I have a related question. Is it
> normal that repeated C-g didn't abort?

No.  In this particular scenario, though, the 100% CPU usage was
happening in a timer function, so your C-g would just abort the
foreground function, i.e. nothing.  At least in this situation Emacs
wasn't completely frozen, since foreground processing took priority over
the background fontification.

> There's nothing that seemed to work for me except waiting, which means
> that with a few scrolling moves queued I just ended up killing emacs.

Ah.  Sorry.

> I didn't test if there was a difference between JIT/no-JIT versions
> (should there ever be in terms of quitting behavior?)

I don't know that.  But jit is pretty much universal now, apart from
for testing purposes by developers.

> > Then please report back to the bug list confirming that the bug is
> > fixed, or telling me what's still not right.

> Tested in both the small test I posted and the full source file I was
> working with. Applied on master. Seems to be working perfectly now.

Thanks!  That's good to hear.  I'll just give Zhiwei Chen a little time
to reply, and assuming (s)he doesn't find problems, I'll commit the fix.

-- 
Alan Mackenzie (Nuremberg, Germany).





  parent reply	other threads:[~2021-11-12 19:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 19:00 bug#51692: 29.0.50; High CPU in c++ mode. Type finder? David Koppelman
2021-11-09  4:11 ` Lars Ingebrigtsen
2021-11-11 20:00 ` Alan Mackenzie
2021-11-11 20:13   ` David Koppelman
2021-11-12  9:47   ` Yuri D'Elia
2021-11-12 12:06     ` Eli Zaretskii
2021-11-12 19:08     ` Alan Mackenzie [this message]
2021-11-13  9:24       ` Zhiwei Chen
2021-11-13 12:10         ` Alan Mackenzie

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=YY67u9X3f3fk4xdv@ACM \
    --to=acm@muc.de \
    --cc=51692@debbugs.gnu.org \
    --cc=condy0919@gmail.com \
    --cc=koppel@ece.lsu.edu \
    --cc=larsi@gnus.org \
    --cc=wavexx@thregr.org \
    /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).