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

[LSP] Return the same resultId if the diagnostic report is the same #75240

Open
dibarbet opened this issue Sep 25, 2024 · 2 comments
Open

[LSP] Return the same resultId if the diagnostic report is the same #75240

dibarbet opened this issue Sep 25, 2024 · 2 comments
Assignees
Labels
Area-IDE LSP issues related to the roslyn language server protocol implementation untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@dibarbet
Copy link
Member

Related to https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2261953

Diagnostic allocations are coming up as a high hitting perf issue. The request from the VS client side is for the server to re-use resultIds more often. Currently we only re-use the resultId if we see that the checksum of the current document+project cone is the same as the last request. The requested change is as follows

If both the last diagnostic report and the current diagnostic report for a document+kind contains the exact same data, then we should re-use the resultId from the last report to avoid re-serializing over the same diagnostic data.

@dibarbet dibarbet added the LSP issues related to the roslyn language server protocol implementation label Sep 25, 2024
@dibarbet dibarbet self-assigned this Sep 25, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Sep 25, 2024
@CyrusNajmabadi
Copy link
Member

If both the last diagnostic report and the current diagnostic report for a document+kind contains the exact same data,

How would we know if it has the same data? Or is this a suggestion for us to cache teh results as well on our end to compare against?

@dibarbet
Copy link
Member Author

If both the last diagnostic report and the current diagnostic report for a document+kind contains the exact same data,

How would we know if it has the same data? Or is this a suggestion for us to cache teh results as well on our end to compare against?

Yeah - cache the result (or hash of result or something) with the resultId so we can compare and avoid re-sending the same diagnostics again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE LSP issues related to the roslyn language server protocol implementation untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants