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

Remove inefficient Regexp scan in compress_snappy_stream #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

junegunn
Copy link

@junegunn junegunn commented Nov 29, 2021

Contrary to our expectation, we observed that logstash process consumes more CPU time when using Snappy compression than when using gzip.

Profiling shows that the Regexp scans for splitting the input data into chunks were using a large portion of the CPU time.

image

We can change it to a simple substring loop and remove the unnecessary overhead.

Contrary to our expectation, we observed that logstash process consumes
more CPU time when using Snappy compression than when using GZ.

Profiling shows that the Regexp scans for splitting the input data into
chunks were using a large portion of the CPU time. We can change it to
a simple substring loop and remove the unnecessary overhead.
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.

1 participant