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

Use zstd over gzip when not compiling for WASM #44

Merged
merged 15 commits into from
Jul 1, 2019
Merged

Use zstd over gzip when not compiling for WASM #44

merged 15 commits into from
Jul 1, 2019

Conversation

Jake-Shadle
Copy link
Contributor

Issue #, if available: #43

Description of changes:
This replaces the use of a gzip with zstd for compression the spdx archive, which results in a much smaller cache/binary, and very slightly faster decompression. This change does not affect WASM however, as zstd is not out of the box compatible with wasm, and a cursory glance didn't show any feature toggles that might be used to make it so, so that WASM path still uses gzip.

I also made a slight change to the LicenseMatch to just return a &str rather than a new String, as well as replace the use of the macro in the analyze pass with a normal closure.

I also fixed some warnings.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Owner

@jpeddicord jpeddicord left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I'm excited to see this. Excellent changes, I just had a couple comments (only one which is really actionable).

Cargo.toml Show resolved Hide resolved
src/preproc.rs Outdated Show resolved Hide resolved
src/store/analyze.rs Show resolved Hide resolved
src/store/analyze.rs Show resolved Hide resolved
NOTE: At least on my machine, this doesn't
compile correctly for wasm, as the zstd features don't
seem to be working correctly, eg ZSTD_LEGACY_SUPPORT=1 is passed to the
C compiler, even though that feature should
be disabled.
@jpeddicord
Copy link
Owner

Great changes, thank you! I think this looks good to merge; I'm taking care of my usual Monday fun and will merge this in later today. Don't worry too much about wasm; it's an eventual goal but it's still very experimental as far as askalono is concerned.

@Jake-Shadle
Copy link
Contributor Author

Cool, no rush!

@jpeddicord jpeddicord merged commit f6d98b6 into jpeddicord:master Jul 1, 2019
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.

2 participants