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

Optimize capture of thread traces #1300

Merged
merged 1 commit into from
Jun 25, 2021
Merged

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Jun 25, 2021

Goal

Adds some additional optimizations for capturing thread traces. Namely:

  • Use any() rather than a for loop, which saves on iterator creation when the collection is empty and marginally improves performance
  • Store the result of getClassName() to avoid multiple lookups
  • Avoid calling Thread.currentThread() when sendThreads should not collect this information

Testing

Relied on existing test coverage.

@fractalwrench fractalwrench force-pushed the optimise-trace-capture branch from 726ef86 to dc4b4a1 Compare June 25, 2021 15:01
@fractalwrench fractalwrench marked this pull request as ready for review June 25, 2021 15:29
@fractalwrench fractalwrench requested a review from lemnik June 25, 2021 15:29
Copy link
Contributor

@lemnik lemnik left a comment

Choose a reason for hiding this comment

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

LGTM

@fractalwrench fractalwrench merged commit 259d52a into next Jun 25, 2021
@fractalwrench fractalwrench deleted the optimise-trace-capture branch June 25, 2021 15:57
fractalwrench added a commit that referenced this pull request Jun 25, 2021
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