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

Fix Message.equals #194

Merged
merged 1 commit into from
May 18, 2022
Merged

Fix Message.equals #194

merged 1 commit into from
May 18, 2022

Conversation

retronym
Copy link
Contributor

I noticed excessive CPU usage in HashMap lookups in StatsDAggregator.
The stacks shows that the HashMap had devolved into a TreeMap which
happens after frequent hash collisions. That got me looking at the
implementations of hashCode/equals in the Message heirarchy and
this seems a likely culprit.

I noticed excessive CPU usage in HashMap lookups in StatsDAggregator.
The stacks shows that the HashMap had devolved into a TreeMap which
happens after frequent hash collisions. That got me looking at the
implementations of hashCode/equals in the Message hierarchy.
@retronym
Copy link
Contributor Author

These are the only two instances of String comparison with ==, according to the linter in IntelliJ.

@retronym retronym changed the title Fix AlphaNumericMessage.equals Fix Message.equals May 17, 2022
@vickenty vickenty merged commit ad4daea into DataDog:master May 18, 2022
@vickenty
Copy link
Contributor

Thank you!

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