Remove some uses of the dispatcher #9023
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now that the project snapshot manager is a lock based management, reading especially should be easy to remove. This removes it from two areas to start, but it should be fairly impactful.
The DocumentContextFactory gets used on every LSP incoming message to create the context we use for our handlers. Hopefully we should just see wins for this removal, since we're now consistant with expectations around our message dispatching. Things that do not mutate the workspace are allowed to run in parallel, and things that don't should be run serial and block other handlers from getting called.
The removal from the component search seems trivial, so I just did it. I'm not sure of the impact of this area tbh, but it shouldn't break anything.
Commits tell each part of the story, but it's not a large change. Choose your favorite method of reviewing.