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

Don't use tracing for non-traced rpc calls #6988

Merged
merged 3 commits into from
May 7, 2024
Merged

Don't use tracing for non-traced rpc calls #6988

merged 3 commits into from
May 7, 2024

Conversation

benaadams
Copy link
Member

Changes

  • Tracing is used to allow for cancellation, however to also introduces overheads from actually capturing all the trace data, even if it just throws it away.
  • Instead introduce a IsCancelled property that can be checked once per loop

Types of changes

What types of changes does your code introduce?

  • Optimization

Testing

Requires testing

  • No

@benaadams benaadams merged commit 7f750d3 into master May 7, 2024
67 checks passed
@benaadams benaadams deleted the tracerpc branch May 7, 2024 10:21
Comment on lines +822 to +825
if (isCancelable && _txTracer.IsCancelled)
{
ThrowOperationCanceledException();
}
Copy link
Member

Choose a reason for hiding this comment

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

How is that much faster than IsTracingInstructions?

Copy link
Member Author

Choose a reason for hiding this comment

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

IsTracingInstructions == true comes with the additional load of copying every stack data change, memory copy etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants