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

improve performance of completion & signature request on typing #2148

Merged
merged 1 commit into from
Dec 21, 2022
Merged

Conversation

rchl
Copy link
Member

@rchl rchl commented Dec 21, 2022

Before triggering completion or signature request, we are forcing a purge_changes_async() because we have to. This immediately triggered various non-essential requests like semantic highlighting, inline hints, document link, color boxes which can dramatically reduce responsiveness due to those requests jumping in front of the queue. Instead trigger those in the next "tick" so that the completion/signature requests are triggered first.

Before those changes (with semantic highlighting enabled and being the main reason for worse responsiveness):

Screen.Recording.2022-12-21.at.15.23.32.mov

With those changes:

Screen.Recording.2022-12-21.at.15.22.28.mov

@rchl rchl changed the title improve performance of completion or signature response when typing improve performance of completion & signature response when typing Dec 21, 2022
@rchl
Copy link
Member Author

rchl commented Dec 21, 2022

Disable showing whitespace changes if the diff is hard to read.

@rchl rchl changed the title improve performance of completion & signature response when typing improve performance of completion & signature request on typing Dec 21, 2022
@rchl rchl merged commit c57249d into main Dec 21, 2022
@rchl rchl deleted the fix/perf branch December 21, 2022 19:23
rchl added a commit that referenced this pull request Jan 16, 2023
* main: (30 commits)
  Make Document Symbols behavior more consistent with built-in Goto Symbol (#2166)
  docs: fsautocomplete config - remove redundant argument (#2165)
  Allow missing window/workDoneProgress/create request from the server (#2159)
  Use "plaintext" language ID for plain text files (#2164)
  Improve type annotations (#2162)
  Don't use "escapeall" extension when formatting with mdpopups (#2163)
  Cut 1.21.0
  Fix inlay hint parts wrapping into multiple lines (#2153)
  Ensure commands triggered from minihtml run on correct view (#2154)
  Add "Source Action" entry to the "Edit" main menu (#2149)
  Add "Refactor" entry to the "Edit" main menu (#2141)
  fix completion documentation being parsed as markdown twice (#2146)
  when going to definition scroll to start of the region, not end (#2147)
  Auto-restart on server crashing, up to 5 times (#2145)
  improve performance of completion & signature request on typing (#2148)
  fix code lenses not updating after Undo (#2139)
  docs: fix mixed indentation in language servers configuration
  add missing Goto commands to Command Palette (#2140)
  docs: add missing keyboard shortcuts (#2143)
  Pass force_group to LocationPicker (#2134)
  ...
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.

2 participants