graphql-dotnet / parser

A lexer and parser for GraphQL in .NET
MIT License
216 stars 43 forks source link

Remove ThrowIfCancellationRequested from VisitAsync #337

Closed Shane32 closed 1 year ago

Shane32 commented 1 year ago

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.

codecov-commenter commented 1 year ago

Codecov Report

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

:exclamation: 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