-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LSP Optimization: Use rayon for
parse_ast_to_typed_tokens
function (#…
…5473) ## Description Traversing the typed tokens from `sway-lib-std` now goes from `3.957833ms` → `1.372ms`. Collecting typed tokens on the benchmark project goes from `139.6ms` → `127.7ms`. I noticed that there are transient contentions when reading items from the `TokenMap` with this change. As such, I've implemented a new function on the `TokenMap` called `try_get_mut_with_retry`. This method tries to access the value up to 8 times if the lock is still held using the backoff and retry pattern. related to #5445
- Loading branch information
1 parent
b2936e4
commit 8a4389e
Showing
4 changed files
with
131 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.