Build settings index in parallel for the native server#12299
Build settings index in parallel for the native server#12299dhruvmanila merged 2 commits intomainfrom
Conversation
|
|
|
||
| let directory = entry.into_path(); | ||
| let mut builder = WalkBuilder::new(root); | ||
| builder.standard_filters(true); |
There was a problem hiding this comment.
Do we need to respect the respect_gitignore setting here?
There was a problem hiding this comment.
I think so. Let me check.
There was a problem hiding this comment.
I've added it where by default it's true and if we find any config file it'll use the value from that instead.
|
What's also important to note is that this will exclude directories that are ignored |
|
Nice. |
I don't think that's the case if there's no config file present in the root directory. This is because the first loop extracts the settings from the root config file: ruff/crates/ruff_server/src/session/index/ruff_settings.rs Lines 105 to 128 in ecd6865 This is then used when walking through the project files to determine whether a directory should be excluded or not: ruff/crates/ruff_server/src/session/index/ruff_settings.rs Lines 141 to 205 in ecd6865 Maybe we can use the fallback settings if there is none in the root directory? |
cb87b15 to
ba08519
Compare
This was a leftover from #12299
Summary
This PR updates the server to build the settings index in parallel using similar logic as
python_files_in_path.This should help with #11366 but ideally we would want to build it lazily.
Test Plan
cargo insta test