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

Remove ThrowIfCancellationRequested from VisitAsync #337

Merged
merged 1 commit into from
Jul 22, 2023

Conversation

Shane32
Copy link
Member

@Shane32 Shane32 commented Jul 18, 2023

As VisitAsync is a very 'hot' path with very little execution time, context.CancellationToken.ThrowIfCancellationRequested(); has been removed for faster execution.

See https://devblogs.microsoft.com/premier-developer/recommended-patterns-for-cancellationtoken/

Consider not checking the token at all if your work is very quick, or you propagate it to the methods you call.

@Shane32 Shane32 added this to the 8.4 milestone Jul 18, 2023
@Shane32 Shane32 self-assigned this Jul 18, 2023
@github-actions github-actions bot added the test Pull request that adds new or changes existing tests label Jul 18, 2023
@Shane32 Shane32 added performance and removed test Pull request that adds new or changes existing tests labels Jul 18, 2023
@Shane32 Shane32 requested a review from sungam3r July 18, 2023 18:11
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (v8@e5bc3f9). Click here to learn what that means.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@          Coverage Diff          @@
##             v8     #337   +/-   ##
=====================================
  Coverage      ?   96.31%           
=====================================
  Files         ?       87           
  Lines         ?     4967           
  Branches      ?      471           
=====================================
  Hits          ?     4784           
  Misses        ?      183           
  Partials      ?        0           

@Shane32 Shane32 merged commit fab4691 into v8 Jul 22, 2023
@Shane32 Shane32 deleted the remove_cancellation_check branch July 22, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants