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

Let user choose compression algorithm #131

Closed
emilk opened this issue Apr 17, 2023 · 2 comments
Closed

Let user choose compression algorithm #131

emilk opened this issue Apr 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@emilk
Copy link
Collaborator

emilk commented Apr 17, 2023

We currently use zstd to compress the profile stream. However, it compiles and runs very slow (see #130).

A great alternative would be lz4_flex, which both compiles and runs very fast. It is also pure Rust, so it works on Wasm.

I think it would be worth to refactor puffin to support multiple compression schemes/libraries (zstd and lz4_flex, initially). The compression scheme would need to be encoded in the data stream. The puffin_viewer binary would support all of them for maximal compatibility, but we would let users of puffin to opt-in to different compression libraries so the users can chose between fast compression and compilation, or high compression ratio.

Alternatively, if that is too much work, we can just switch out zstd for lz4 and have a big breaking change.

@emilk emilk added the enhancement New feature or request label Apr 17, 2023
@repi
Copy link
Contributor

repi commented Apr 17, 2023

agreed, zstd is a pretty big C dependency to bring in to clients as well. a smaller pure rust one would be nicer, and we don't need the highest compression ratios

@repi
Copy link
Contributor

repi commented Jun 8, 2023

this is implemented

@repi repi closed this as completed Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants