bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#58860: 29.0.50; [PATCH] semantic/fw.el: speed up the 'semantic-find-


From: Stefan Monnier
Subject: bug#58860: 29.0.50; [PATCH] semantic/fw.el: speed up the 'semantic-find-file-noselect'
Date: Sat, 29 Oct 2022 11:06:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> I find the semantic mode will try to analyse the chained header files,
> by calling the function (semantic-find-file-noselect ...) to open the
> file and analyse its content, while the `find-file-hook` may have many
> heavy functions.
> Disabling the `find-file-hook` do have great performance improvement
> for semantic mode.

Putting expensive code in `find-file-hook` is usually a problem
in itself.  And like Eli, I find it risky to disable it wholesale.

But the rest of code seems to call this function only if the file is not
yet visited and it always tries to kill the buffer afterwards, so really
this could just as well use a temp buffer and
`insert-file-contents` instead.

So in the end I guess the patch is OK (except for the comment, which
just paraphrases the code and thus doesn't add any information).
The other disabled thingies in that function are already similarly
problematic :-)


        Stefan






reply via email to

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