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

Reduce garbage from allocations in deprecation logger (#38780) #39370

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

ebadyano
Copy link
Contributor

  1. Setting length for formatWarning String to avoid AbstractStringBuilder.ensureCapacityInternal calls
  2. Adding extra check for parameter array length == 0 to avoid unnecessarily creating StringBuilder in LoggerMessageFormat.format

Helps to narrow the performance gap in throughout for geonames benchmark (#37411) by 3%. For more details: #37530 (comment)

Relates to #37530
Relates to #37411
Relates to #35754

1. Setting length for formatWarning String to avoid AbstractStringBuilder.ensureCapacityInternal calls
2. Adding extra check for parameter array length == 0 to avoid unnecessarily creating StringBuilder in LoggerMessageFormat.format

Helps to narrow the performance gap in throughout for geonames benchmark (elastic#37411) by 3%. For more details: elastic#37530 (comment) 

Relates to elastic#37530
Relates to elastic#37411
Relates to elastic#35754
@ebadyano
Copy link
Contributor Author

@elasticmachine retest this please

@ebadyano ebadyano merged commit 1ed3407 into elastic:7.x Feb 25, 2019
@ebadyano ebadyano deleted the 7.x branch February 25, 2019 21:24
@ebadyano ebadyano added >enhancement :Core/Infra/Logging Log management and logging utilities labels Feb 25, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Core/Infra/Logging Log management and logging utilities >enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants