Skip to content

perf: remove ActivityCorrelator.Current.ToString() calls in tracing#506

Merged
cheenamalhotra merged 2 commits into
dotnet:masterfrom
Wraith2:perf-traceevent2
Apr 7, 2020
Merged

perf: remove ActivityCorrelator.Current.ToString() calls in tracing#506
cheenamalhotra merged 2 commits into
dotnet:masterfrom
Wraith2:perf-traceevent2

Conversation

@Wraith2

@Wraith2 Wraith2 commented Apr 5, 2020

Copy link
Copy Markdown
Contributor

Another small one. While profiling I noticed some calls to ActivityCorrelator.Current.ToString() coming from calls to trace methods, the trace methods call ToString() on the args if logging of that method is enabled so these are just wasted string allocations for most people.

@David-Engel David-Engel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@cheenamalhotra

Copy link
Copy Markdown
Member

Please also update on NetFx side.

@Wraith2

Wraith2 commented Apr 6, 2020

Copy link
Copy Markdown
Contributor Author

I've said repeatedly that maintaining two separate codebases for this library is not helpful. Can you please come up with a policy decision on this instead of ignoring it and repeatedly asking me to backport things to netfx that aren't going to make a difference to it.

@cheenamalhotra

Copy link
Copy Markdown
Member

Ok, I guess we will then tag such PRs with the tag "Port to NetFx" and create a parallel PR to be merged along with yours.

@David-Engel

Copy link
Copy Markdown
Contributor

I've said repeatedly that maintaining two separate codebases for this library is not helpful. Can you please come up with a policy decision on this instead of ignoring it and repeatedly asking me to backport things to netfx that aren't going to make a difference to it.

@Wraith2 We've said in the past that we would like to keep the code bases equivalent, when it is reasonable to do so. Thus we have consistently asked to make changes to both in previous PRs. We have been flexible about it when it does not make sense to change the netfx code or is too burdensome to do so. Long-term, we would like to have one code base and we will try to work incrementally towards that (see #504). Diverging code now makes that more difficult when someone in the future tries to reconcile differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Performance 📈 Issues that are targeted to performance improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants