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

Optimize retrieve_interface_surface_and_items_and_implemented_items_for_type #5837

Merged
merged 5 commits into from
Apr 10, 2024

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Apr 8, 2024

Description

Partially addresses #5781.

This reduces the problem of millions of TyFunctionDecl being created.
For more details see: #5782

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.

@xunilrj xunilrj self-assigned this Apr 8, 2024
@xunilrj xunilrj requested a review from a team April 8, 2024 15:04
@IGI-111 IGI-111 requested a review from a team April 8, 2024 15:10
Copy link

github-actions bot commented Apr 8, 2024

Benchmark for 9088a91

Click to view benchmark
Test Base PR %
code_action 5.3±0.06ms 5.3±0.15ms 0.00%
code_lens 286.9±6.16ns 289.5±8.60ns +0.91%
compile 5.9±0.04s 5.4±0.03s -8.47%
completion 4.8±0.12ms 4.8±0.09ms 0.00%
did_change_with_caching 5.4±0.04s 5.2±0.04s -3.70%
document_symbol 961.9±12.83µs 1022.9±47.90µs +6.34%
format 71.2±0.90ms 76.0±1.24ms +6.74%
goto_definition 368.7±23.40µs 360.1±5.57µs -2.33%
highlight 8.8±0.05ms 8.7±0.21ms -1.14%
hover 596.0±6.07µs 596.4±20.38µs +0.07%
idents_at_position 123.6±0.24µs 122.6±1.20µs -0.81%
inlay_hints 662.2±19.76µs 668.4±38.71µs +0.94%
on_enter 485.3±10.24ns 475.2±14.75ns -2.08%
parent_decl_at_position 3.6±0.02ms 3.6±0.02ms 0.00%
prepare_rename 358.6±5.10µs 359.9±4.37µs +0.36%
rename 9.2±0.04ms 9.1±0.17ms -1.09%
semantic_tokens 1069.6±17.43µs 1051.5±17.91µs -1.69%
token_at_position 408.8±2.54µs 361.2±4.73µs -11.64%
tokens_at_position 3.6±0.03ms 3.6±0.04ms 0.00%
tokens_for_file 421.9±1.83µs 409.1±3.67µs -3.03%
traverse 44.5±1.74ms 44.8±1.65ms +0.67%

Copy link

github-actions bot commented Apr 8, 2024

Benchmark for 2a1e0fc

Click to view benchmark
Test Base PR %
code_action 5.3±0.09ms 5.2±0.10ms -1.89%
code_lens 290.3±9.53ns 291.8±16.64ns +0.52%
compile 5.9±0.08s 5.4±0.08s -8.47%
completion 4.8±0.08ms 4.8±0.03ms 0.00%
did_change_with_caching 5.5±0.07s 5.4±0.07s -1.82%
document_symbol 954.7±19.59µs 979.4±10.76µs +2.59%
format 73.0±0.91ms 73.3±2.39ms +0.41%
goto_definition 356.9±6.56µs 362.1±6.30µs +1.46%
highlight 8.7±0.03ms 8.7±0.18ms 0.00%
hover 626.8±17.58µs 656.9±25.60µs +4.80%
idents_at_position 124.7±1.20µs 125.8±2.44µs +0.88%
inlay_hints 650.9±15.77µs 671.2±26.86µs +3.12%
on_enter 494.6±33.50ns 488.8±17.10ns -1.17%
parent_decl_at_position 3.6±0.04ms 3.6±0.03ms 0.00%
prepare_rename 359.0±3.59µs 366.8±8.68µs +2.17%
rename 9.1±0.03ms 9.1±0.17ms 0.00%
semantic_tokens 1056.4±25.47µs 1069.4±42.39µs +1.23%
token_at_position 356.1±1.91µs 365.7±2.87µs +2.70%
tokens_at_position 3.6±0.03ms 3.6±0.06ms 0.00%
tokens_for_file 412.4±3.47µs 411.3±2.27µs -0.27%
traverse 44.5±1.03ms 45.2±1.79ms +1.57%

Copy link

github-actions bot commented Apr 8, 2024

Benchmark for 2c73627

Click to view benchmark
Test Base PR %
code_action 5.3±0.04ms 5.2±0.09ms -1.89%
code_lens 289.9±11.76ns 290.9±9.30ns +0.34%
compile 5.9±0.07s 5.5±0.04s -6.78%
completion 4.8±0.15ms 4.8±0.09ms 0.00%
did_change_with_caching 5.4±0.04s 5.3±0.06s -1.85%
document_symbol 1103.2±19.39µs 976.7±33.88µs -11.47%
format 71.8±1.55ms 74.3±1.35ms +3.48%
goto_definition 363.4±4.36µs 364.7±9.07µs +0.36%
highlight 8.7±0.05ms 8.7±0.21ms 0.00%
hover 593.8±8.32µs 603.9±22.27µs +1.70%
idents_at_position 123.0±0.31µs 122.4±0.53µs -0.49%
inlay_hints 658.4±20.17µs 661.9±31.50µs +0.53%
on_enter 482.2±5.41ns 490.9±14.50ns +1.80%
parent_decl_at_position 3.6±0.02ms 3.6±0.03ms 0.00%
prepare_rename 367.5±6.55µs 366.8±7.95µs -0.19%
rename 9.3±0.33ms 9.2±0.20ms -1.08%
semantic_tokens 1062.9±15.46µs 1012.8±19.34µs -4.71%
token_at_position 354.6±2.43µs 362.3±4.04µs +2.17%
tokens_at_position 3.6±0.03ms 3.6±0.04ms 0.00%
tokens_for_file 411.7±4.41µs 408.5±2.90µs -0.78%
traverse 44.5±1.98ms 45.9±2.40ms +3.15%

tritao
tritao previously approved these changes Apr 8, 2024
Copy link

github-actions bot commented Apr 9, 2024

Benchmark for 16ff893

Click to view benchmark
Test Base PR %
code_action 5.6±0.07ms 5.3±0.04ms -5.36%
code_lens 289.1±7.72ns 296.0±22.28ns +2.39%
compile 6.6±0.16s 6.1±0.13s -7.58%
completion 5.3±0.16ms 4.8±0.29ms -9.43%
did_change_with_caching 6.4±0.11s 6.4±0.11s 0.00%
document_symbol 949.6±12.94µs 948.7±20.42µs -0.09%
format 76.6±1.40ms 79.8±1.58ms +4.18%
goto_definition 371.7±13.27µs 367.8±6.00µs -1.05%
highlight 9.2±0.28ms 8.8±0.44ms -4.35%
hover 609.5±16.67µs 611.1±23.56µs +0.26%
idents_at_position 123.1±0.41µs 124.4±1.72µs +1.06%
inlay_hints 671.2±41.16µs 659.6±23.23µs -1.73%
on_enter 518.0±5.07ns 493.5±35.61ns -4.73%
parent_decl_at_position 3.7±0.03ms 3.6±0.06ms -2.70%
prepare_rename 372.1±7.04µs 371.5±8.84µs -0.16%
rename 9.8±0.17ms 9.2±0.07ms -6.12%
semantic_tokens 1052.3±10.54µs 1046.5±14.40µs -0.55%
token_at_position 368.6±2.46µs 369.6±3.00µs +0.27%
tokens_at_position 3.8±0.08ms 3.6±0.04ms -5.26%
tokens_for_file 409.2±2.49µs 412.8±2.48µs +0.88%
traverse 49.6±1.24ms 52.6±2.89ms +6.05%

@xunilrj xunilrj requested review from IGI-111 and tritao April 9, 2024 14:17
@xunilrj
Copy link
Contributor Author

xunilrj commented Apr 9, 2024

Had to rebase. @IGI-111 and @tritao

@xunilrj xunilrj enabled auto-merge (squash) April 9, 2024 20:23
@JoshuaBatty JoshuaBatty requested a review from a team April 9, 2024 23:35
@xunilrj xunilrj merged commit 35c810e into master Apr 10, 2024
36 checks passed
@xunilrj xunilrj deleted the xunilrj/subst-type-returning-bool branch April 10, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants