Skip to content
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

move documents from Session to ServerState #5862

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Conversation

JoshuaBatty
Copy link
Member

@JoshuaBatty JoshuaBatty commented Apr 16, 2024

Description

1st part of a code reorganization. Documents are now stored in ServerState meaning the documents can be shared across workspace members.

No new code was added.

related to #5856

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@JoshuaBatty JoshuaBatty marked this pull request as draft April 16, 2024 05:27
@JoshuaBatty JoshuaBatty marked this pull request as ready for review April 16, 2024 05:40
@JoshuaBatty JoshuaBatty requested review from a team April 16, 2024 05:41
@JoshuaBatty JoshuaBatty enabled auto-merge (squash) April 16, 2024 05:42
Copy link

Benchmark for 85e919b

Click to view benchmark
Test Base PR %
code_action 5.3±0.09ms 5.3±0.13ms 0.00%
code_lens 293.9±13.01ns 299.5±8.77ns +1.91%
compile 6.0±0.05s 6.1±0.06s +1.67%
completion 4.8±0.04ms 4.9±0.21ms +2.08%
did_change_with_caching 6.0±0.06s 6.1±0.06s +1.67%
document_symbol 946.5±14.08µs 962.4±41.17µs +1.68%
format 76.3±1.23ms 76.1±1.96ms -0.26%
goto_definition 366.9±9.05µs 365.1±5.42µs -0.49%
highlight 8.8±0.06ms 8.7±0.03ms -1.14%
hover 688.3±7.66µs 629.0±25.31µs -8.62%
idents_at_position 123.6±0.59µs 122.7±0.89µs -0.73%
inlay_hints 661.1±16.29µs 652.1±18.59µs -1.36%
on_enter 480.7±13.78ns 488.5±18.24ns +1.62%
parent_decl_at_position 3.6±0.03ms 3.6±0.03ms 0.00%
prepare_rename 371.8±7.20µs 362.3±4.26µs -2.56%
rename 9.3±0.15ms 9.3±0.28ms 0.00%
semantic_tokens 1028.9±28.86µs 1024.7±10.77µs -0.41%
token_at_position 366.7±3.05µs 364.6±3.05µs -0.57%
tokens_at_position 3.6±0.02ms 3.6±0.17ms 0.00%
tokens_for_file 421.6±1.98µs 431.4±1.44µs +2.32%
traverse 50.3±2.06ms 50.7±1.57ms +0.80%

Copy link
Member

@sdankel sdankel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

Copy link

Benchmark for 4d83c33

Click to view benchmark
Test Base PR %
code_action 5.4±0.14ms 5.4±0.19ms 0.00%
code_lens 294.8±9.09ns 296.6±7.36ns +0.61%
compile 6.3±0.12s 6.4±0.07s +1.59%
completion 5.2±0.20ms 4.9±0.10ms -5.77%
did_change_with_caching 6.3±0.14s 6.4±0.05s +1.59%
document_symbol 1023.3±43.97µs 938.5±16.58µs -8.29%
format 78.5±2.05ms 77.0±2.39ms -1.91%
goto_definition 367.5±5.80µs 366.2±7.98µs -0.35%
highlight 8.9±0.25ms 8.8±0.31ms -1.12%
hover 609.0±18.45µs 610.5±21.39µs +0.25%
idents_at_position 125.0±0.41µs 123.6±3.27µs -1.12%
inlay_hints 664.7±37.59µs 657.4±31.27µs -1.10%
on_enter 487.7±14.85ns 484.2±12.43ns -0.72%
parent_decl_at_position 3.6±0.05ms 3.6±0.08ms 0.00%
prepare_rename 369.9±11.72µs 367.8±5.60µs -0.57%
rename 9.8±0.23ms 9.7±0.28ms -1.02%
semantic_tokens 1068.4±20.58µs 1052.8±42.79µs -1.46%
token_at_position 367.5±5.94µs 364.1±2.91µs -0.93%
tokens_at_position 3.7±0.10ms 3.6±0.09ms -2.70%
tokens_for_file 416.9±4.45µs 433.6±8.15µs +4.01%
traverse 50.7±2.16ms 50.9±2.11ms +0.39%

@JoshuaBatty JoshuaBatty requested a review from a team April 16, 2024 21:01
@JoshuaBatty JoshuaBatty merged commit fbb5c7a into master Apr 16, 2024
36 checks passed
@JoshuaBatty JoshuaBatty deleted the josh/documents branch April 16, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants