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

[release/7.0-staging][wasm][debugger] Improve debugger performance #88602

Merged

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Jul 10, 2023

Only try to use the debugger protocol if HttpClient.GetByteArrayAsync does not work.

Customer Impact:
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1772588
When the customer has a lot of assemblies in its solution the debugger takes a long time to attach.

Testing:
Launching the app and trying to debug. It reduces the attachment time by 2x, like from 4 seconds to 2 seconds.

Risk:
Low, only using the HttpClient.GetByteArrayAsync as it was used before, and retry with the debugger protocol if it fails.

@ghost
Copy link

ghost commented Jul 10, 2023

Tagging subscribers to this area: @thaystg
See info in area-owners.md if you want to be subscribed.

Issue Details

Only try to use the debugger protocol if HttpClient.GetByteArrayAsync does not work.

Customer Impact
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1772588
When the customer has a lot of assemblies in its solution the debugger takes a long time to attach.

Testing:
Launching the app and trying to debug. It reduces the attachment time by 2x, like from 4 seconds to 2 seconds.

Risk
Low, only using the HttpClient.GetByteArrayAsync as it was used before, and retry with the debugger protocol if it fails.

Author: thaystg
Assignees: -
Labels:

area-Debugger-mono

Milestone: -

@thaystg thaystg added the Servicing-consider Issue for next servicing release review label Jul 10, 2023
else
{
foreach (string file_name in loaded_files)
catch (Exception e)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check for more specific exception type(s)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, the retry should be if either of the two tasks fail, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it logger.LogDebug if it goes down this new path?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont't think so, only if it fails in the retry process too, or if tryUseDebuggerProtocol is disabled.

@thaystg thaystg added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jul 10, 2023
@thaystg
Copy link
Member Author

thaystg commented Jul 10, 2023

Approved by email.

@thaystg thaystg requested a review from danmoseley July 10, 2023 20:28
@thaystg thaystg merged commit 062fd6f into dotnet:release/7.0-staging Jul 10, 2023
66 of 70 checks passed
@radical radical mentioned this pull request Aug 3, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Debugger-mono Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants