chore: drop slotmap
and simplify locking
#4696
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.
Summary
This PR drops the
slotmap
dependency in favor ofpapaya
, and simplifies some of the locking inside the workspace settings.The main tradeoff this makes is that we need to perform more cloning of the
Settings
struct, which is a rather large one. To mitigate the impact of this I changedMatcher
such that is holds anArc
internally, making it cheap to clone. As part of this, I was also able to get rid ofMatcher
's internalRwLock
by utilizingpapaya
again.Test Plan
CI should remain green.
Also checked our release build against the
unleash
repository again. These are performance numbers I'm seeing on that repo (I re-ran each a couple of times to make sure these numbers aren't heavy outliers):Biome 1.9.4:
Checked 4511 files in 729ms.
next
:Checked 4511 files in 744ms.
This PR:
Checked 4511 files in 540ms.
Looks like this creates a nice boost :)
Note that both
next
and this PR now do the scanning upfront, but that doesn't yet result in any speedup of the analysis step of course...Disclaimer: I don't really know whether the speedup is the result of dropping
slotmap
specifically, or because I dropped the "caching" of language settings, or maybe the primary speedup is less locking insideMatcher
...