From: Alan Mackenzie <acm@muc.de>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: c-find-decl-spots
Date: Sat, 10 Jun 2023 12:24:29 +0000 [thread overview]
Message-ID: <ZIRrfUGpR-EaI2O3@ACM> (raw)
In-Reply-To: <87pm65hw5c.fsf@yahoo.com>
Hello, Po.
On Fri, Jun 09, 2023 at 16:34:07 +0800, Po Lu wrote:
> I've been encountering some files that cause C Mode to become
> pathologically slow. The most I can determine is that after each edit,
> `font-lock-fontify-keywords-region' calls the CC Mode fontification
> machinery, which then spends a lot of time in `c-find-decl-spots'.
Thanks for the bug report.
> My guess is that some cache machinery in that function is not working as
> intended. I haven't figured out how to debug this any further. Any
> help would be appreciated.
Presumably, you got some results in one of Emacs's profilers. Any chance
you could post the profiler report?
Is there anything unusual about the C Mode files? For example, are they
very big, have lots of long lines, or exceptionally long macros defined
in them? Or something like that. Of course, if you were able to send
one of these files to me that would help enormously, but I suspect you
can't.
There is a cache used directly in c-find-decl-spots, one that tracks
whether or not the source code is at top-level (including being directly
within things like a C++ class or namespace). Maybe this isn't working
as desired, as you suggest.
> Thanks in advance.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2023-06-10 12:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87pm65hw5c.fsf.ref@yahoo.com>
2023-06-09 8:34 ` c-find-decl-spots Po Lu
2023-06-10 12:24 ` Alan Mackenzie [this message]
2023-06-10 13:03 ` c-find-decl-spots Po Lu
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZIRrfUGpR-EaI2O3@ACM \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.