Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Improve logger & general string concat performance #959

Closed
wants to merge 1 commit into from

Conversation

bbonamin
Copy link
Contributor

Dramatically improves the performance of the code where strings are concatenated, by changing the "+=" for "<<".
Sample profiling of line 50 on logger.rb with a 20,000 lines json response from ElasticSearch:

Before the change
99.74%  48.04 seconds String#each_line

After the change
74.91%  0.11 seconds String#each_line

Fixes #155

@karmi karmi closed this in 58ab10a Apr 12, 2014
@karmi
Copy link
Owner

karmi commented Apr 12, 2014

Thanks, verified and merged!

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

Successfully merging this pull request may close these issues.

When search response is extremely large logging takes a long time
2 participants