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

enhancement(deps): Use zlib-rs for much faster zlib decoding/encoding #22533

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

Conversation

JakubOnderka
Copy link
Contributor

Summary

zlib-rs is much faster for library for zlib decoding/encoding than default miniz_oxide and it is even faster than zlib-ng (https://trifectatech.org/blog/zlib-rs-is-faster-than-c/)

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

Standard tests

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Checklist

  • Please read our Vector contributor resources.
    • make check-all is a good command to run locally. This check is
      defined here. Some of these
      checks might not be relevant to your PR. For Rust changes, at the very least you should run:
      • cargo fmt --all
      • cargo clippy --workspace --all-targets -- -D warnings
      • cargo nextest run --workspace (alternatively, you can run cargo test --all)
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run dd-rust-license-tool write to regenerate the license inventory and commit the changes (if any). More details here.

References

vectordotdev/vrl#1301

@JakubOnderka JakubOnderka requested a review from a team as a code owner February 27, 2025 15:21
@JakubOnderka
Copy link
Contributor Author

dd-rust-license-tool write is failing:

dd-rust-license-tool write
Error: Could not read "/Users/xxx/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/allocator-api2-0.2.16/license"

Caused by:
    Is a directory (os error 21)

Copy link
Member

@pront pront left a comment

Choose a reason for hiding this comment

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

/ci-run-all

@jorgehermo9
Copy link
Contributor

I think adding a changelog to promote this would be cool! These days there is a lot of hype around this https://www.reddit.com/r/rust/comments/1ixt1ei/zlibrs_is_faster_than_c_trifecta_tech_foundation/

@JakubOnderka
Copy link
Contributor Author

Rebased to master.

@pront pront changed the title chore: Use zlib-rs for much faster zlib decoding/encoding performance(deps): Use zlib-rs for much faster zlib decoding/encoding Mar 5, 2025
@pront pront changed the title performance(deps): Use zlib-rs for much faster zlib decoding/encoding enhancement(deps): Use zlib-rs for much faster zlib decoding/encoding Mar 5, 2025
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.

3 participants