Skip to content

Let user choose compression algorithm #131

@emilk

Description

@emilk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions