Reduce blocking time in UpdateSolution_QueryDelayBuildAction#7454
Conversation
|
Let's update the PR title |
Updated :) |
donnie-msft
left a comment
There was a problem hiding this comment.
Is there evidence that this is resolving the issue you described, or is it just something to try and observe its impact?
Had a few questions inline...
I'm not understanding some of the listed items. Such as:
I assume this means VS Options pages, such as PackageSourceMapping. There are no MEF imports in this page, but it does rely on |
I do not have a way to reproduce the issue locally, so I can't directly validate the fix. I had to use telemetry to diagnose the issue in the wild. There are multiple instrumentation points, and the issue I'm attempting to address in this PR is the synchronous blocking in The change to the import flow isn't required to stop the synchronous blocking, but telemetry indicates that this code is rather slow (taking over 17s in a few instances). This was my attempt at speeding things up. |
It's entirely possible that list is inaccurate. That was a quick attempt to see what might have changed to make this path slower recently. This seems like a relatively new issue, so I took a quick look. I can't reproduce this locally, so I can't profile. |
|
This needs a rebase on top of latest dev @Erarndt |
8bfb473 to
2d67aea
Compare
Rebased. Looks like the last NuGet.Clinet-VS run had some failures, but the tests history either looks flaky or has been failing consistently across runs. Do you see anything that I introduced? |
Bug
Fixes:
Description
Users are reporting that there is an occasional lengthy delay before build starts. Some early telemetry shows that it can take over 10s just to construct the
IVsTaskthat gets returned. This isn't the time to finish the restore that the task initiates.The code now unconditionally yields as a first step to return to the caller immediately. Additionally, switching to explicit
GetExport()calls avoid some of the cost associated withSatisfyImportsOnce(). There might be a few innacuracies here, but it looks like there were some recent exports/services that were added that could explain why the MEF construction is showing up now:IVulnerabilitiesNotificationService)PR Checklist