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

Disable DCA and writing diagnostics on did_change events #5555

Merged
merged 11 commits into from
Feb 6, 2024

Conversation

JoshuaBatty
Copy link
Member

@JoshuaBatty JoshuaBatty commented Feb 5, 2024

Description

This PR does 3 optimizations. The timings below are measured against the LSP benchmarking project.

  1. Disable running DCA & control flow analysis, for did_change events 39.544ms
  2. Disable running collect_types_metadata for did_change events 3.522ms
  3. Only write the diagnostics res to self.diagnostics.write() on did_open & did_save 21.135ms

I also had to increase the frequency that we are calling GC to every 3rd keystroke as during stress tests I was occasionally getting stack overflows otherwise.

related to #5445

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 February 5, 2024 22:09
@JoshuaBatty JoshuaBatty self-assigned this Feb 5, 2024
@JoshuaBatty JoshuaBatty added language server LSP server compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen labels Feb 5, 2024
@JoshuaBatty JoshuaBatty requested review from a team February 6, 2024 00:51
@JoshuaBatty JoshuaBatty marked this pull request as ready for review February 6, 2024 00:51
@JoshuaBatty JoshuaBatty requested a review from a team February 6, 2024 22:19
@JoshuaBatty JoshuaBatty enabled auto-merge (squash) February 6, 2024 22:20
@JoshuaBatty JoshuaBatty merged commit f702c41 into master Feb 6, 2024
34 checks passed
@JoshuaBatty JoshuaBatty deleted the josh/optimized_build branch February 6, 2024 23:47
sdankel pushed a commit that referenced this pull request Feb 8, 2024
## Description
This PR does 3 optimizations. The timings below are measured against the
LSP benchmarking project.

1. Disable running DCA & control flow analysis, for did_change events
`39.544ms`
2. Disable running collect_types_metadata for did_change events
`3.522ms`
3. Only write the diagnostics res to self.diagnostics.write() on
did_open & did_save `21.135ms`

I also had to increase the frequency that we are calling GC to every 3rd
keystroke as during stress tests I was occasionally getting stack
overflows otherwise.

related to #5445

## Checklist

- [x] I have linked to any relevant issues.
- [x] 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](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen language server LSP server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants