-
Notifications
You must be signed in to change notification settings - Fork 146
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
Ruby LSP Indexing is very slow on version 0.19.0 #2671
Comments
Thank you for the report. I think this is likely related to the fact that we started handling multibyte characters correctly in #2619. While I understand that the slow down is not ideal, it's a cost we have to pay to handle non ASCII characters used in Ruby appropriately. For ASCII-only sources, there are optimizations we apply to ensure better performance, but calculating the appropriate code unit locations for multibyte sources is expensive by nature. And we must do it during indexing otherwise users of multibyte characters will get features offset by an incorrect number of bytes, like developers using Japanese characters as part of their Ruby code. Are you using a lot of multibyte characters in your codebase? For example, characters with accents like |
This is a new codebase I am working on, it big and I still don't know it very well yet. But I don't think we have a lot of non ASCII characters. It's an application for USA market only, everything is in English. It is taking a bit more than 4 minutes to index. |
@jmschp I'd be curious to see the times for v0.18.4 vs v0.19.0. (You can temporarily add |
I used the following Regular Expression Times:
|
That's a crazy increase. You're not indexing tests by any chance? Do you use |
I use I have the |
Did you already exclude the spec directory from indexing? If not, can you please try this and let us know if indexing is faster? We should probably exclude {
"rubyLsp.indexing": {
"excludedPatterns": ["**/spec/**.rb"],
},
} |
Description
Ruby LSP Information
VS Code Version
1.91.1
Ruby LSP Extension Version
0.8.2
Ruby LSP Server Version
0.19.0
Ruby LSP Addons
Ruby Version
3.3.5
Ruby Version Manager
asdf
Installed Extensions
Click to expand
Ruby LSP Settings
Click to expand
Workspace
User
Reproduction steps
Code snippet or error message
The text was updated successfully, but these errors were encountered: