sway icon indicating copy to clipboard operation
sway copied to clipboard

Disable DCA and writing diagnostics on did_change events

Open JoshuaBatty opened this issue 1 year ago • 0 comments

Description

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

  1. Disable running DCA & control flow analysis, for didChange events 39.544ms
  2. Disable running collect_types_metadata for didChange events 3.522ms
  3. 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* 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 avatar Feb 05 '24 22:02 JoshuaBatty