Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid running get_words twice when opening new file #1513

Merged
merged 1 commit into from
May 4, 2024

Conversation

ztion
Copy link
Contributor

@ztion ztion commented May 4, 2024

Description

Small fix to make a small performance improvement when opening a file the first time.
Avoids running get_words twice from did_open, and also makes the set created in get_words use version 2 which is a bit more efficient, supported from OTP24.

On a big file like erlfmt_parse.erl on my computer the time spent went from about 960ms to ~850ms.

@plux
Copy link
Contributor

plux commented May 4, 2024

Thanks for you contribution @ztion !

@plux plux merged commit 5111381 into erlang-ls:main May 4, 2024
5 checks passed
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