-
Notifications
You must be signed in to change notification settings - Fork 155
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
Undo changes made in PR #2218 and optimize copying query results #2385
Undo changes made in PR #2218 and optimize copying query results #2385
Conversation
As part of updating the dependencies in Packages.props we require that any PRs opened also verify that Please respond to this comment verifying that you've done the appropriate validation (or explain why it's not necessary) before merging in the PR
|
@lewis-sanchez is it possible to do some basic benchmarking for this change? For example, with some very large resultssets how long does copy take with & without this change on various environments (specifically Linux and Windows). With all the previous PRs in this area linked above, I want to make sure we're address the issue reported in the most recent bug. |
@kburtram, yes, it should be possible to do some benchmarking for this change. |
This PR is a part of microsoft/azuredatastudio#25632
This PR undoes #2218, which removed functionality to copy query results from SQL Tools Service (STS). This PR brings back functionality to copy results into the clipboard from STS. This PR also removes a bottleneck that was making it take a long time to copy query results because the
ToString
method was being repeatedly invoked on the string builder that is assembling the query results string that is added to the clipboard.After optimizing the copy endpoint to stop repeatedly invoking
ToString()
on theStringBuilder
the time needed to copy query results became significantly faster:Before removing the repeated
ToString()
calls:Copying 25,000 rows took 7,982 ms
Copying 50,000 rows took 34,863 ms
Copying 75,000 rows took 76,430 ms
Copying 100,000 rows took 163,462 ms
After removing repeated
ToString()
calls:Copying 25,000 rows took 1.0278617 ms
Copying 50,000 rows took 1.9388735 ms
Copying 75,000 rows took 2.8113253 ms
Copying 100,000 rows took 3.8120204 ms