Skip to content

Conversation

@kevinji
Copy link
Contributor

@kevinji kevinji commented Dec 12, 2025

In a large project with a ton of files, when I changed between branches that had a lot of changed files, lsp--file-process-event would freeze my editor for one full minute due to CPU and memory being pegged—I saw GC using 60% of CPU and the string-match inside that function using 40% of CPU.

After rewriting this function to avoid allocating the intermediate lambdas, the time my editor is spent frozen is now reduced to about two seconds.

I also updated lsp--send-will-rename-files-p to be rewritten in the same way given that it had a very similar -any? structure.

@jcs090218 jcs090218 merged commit 7174260 into emacs-lsp:master Dec 13, 2025
18 checks passed
@jcs090218
Copy link
Member

LGTM. Thank you!

@kevinji kevinji mentioned this pull request Dec 13, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants