emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c-find-decl-spots


From: Alan Mackenzie
Subject: Re: c-find-decl-spots
Date: Sat, 10 Jun 2023 12:24:29 +0000

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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]