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

Greatly reduce server/invalidate request count #84

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

kLabz
Copy link
Contributor

@kLabz kLabz commented Feb 22, 2023

Fixes vshaxe/vshaxe#439

Also fixes these kind of situations where everything is delayed by 6+ (and later 10+) seconds due to these requests:

image

Notes:

  • server/invalidate requests taking ~1.4s are compilation server GC runs (running every 10 requests), which would happen a lot less without these requests
  • don't mind the completion request taking 0s there, it's been cancelled before having its chance to run

@kLabz kLabz marked this pull request as draft February 22, 2023 15:35
@kLabz
Copy link
Contributor Author

kLabz commented Feb 22, 2023

This actually breaks display requests when diagnostics are enabled.
I guess only adding this behavior when diagnostics are disabled would be a first step already? I will check what happens if diagnostics resets invalidated files map, but it seems like overall it won't reduce requests that much.

@kLabz kLabz marked this pull request as ready for review February 22, 2023 15:56
@Gama11 Gama11 merged commit 2d50157 into vshaxe:master Feb 22, 2023
@kLabz kLabz changed the title Only call server/invalidate once per file between compilations Greatly reduce server/invalidate request count Feb 23, 2023
@kLabz kLabz mentioned this pull request Feb 23, 2023
1 task
@RblSb RblSb mentioned this pull request May 31, 2023
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.

maybe server/invalidate calls should be buffered
2 participants