sway
sway copied to clipboard
Disable DCA and writing diagnostics on did_change events
Description
This PR does 3 optimizations. The timings below are measured against the LSP benchmarking project.
- Disable running DCA & control flow analysis, for didChange events
39.544ms - Disable running collect_types_metadata for didChange events
3.522ms - Only write the diagnostics res to self.diagnostics.write() on didSave
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*orNew Featurelabels 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.