-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
topdown: move context.Context cancellation check (#7210)
The topdown Cancel machinery is there because it's cheap to check. ctx.Err() is not. This change moves the "Is the context the cause for cancellation?" check into the branch were evaluation has been aborted through the topdown.Cancel call. When evaluation has already been cancelled, an expensive check no longer matters much -- when it's still ongoing, it'll affect the overall performance. Signed-off-by: Stephan Renatus <[email protected]>
- Loading branch information
Showing
2 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters