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 LZ4 or Snappy instead of Deflate in metadata #6902

Closed
emberian opened this issue Jun 2, 2013 · 4 comments
Closed

Use LZ4 or Snappy instead of Deflate in metadata #6902

emberian opened this issue Jun 2, 2013 · 4 comments

Comments

@emberian
Copy link
Member

emberian commented Jun 2, 2013

Currently decompressing the metadata is ~10% (more on slower computers) of the build time of small crates (eg, the tests). Switching to a faster algorithm would bring that down. I think LZ4 is that algorithm:

  • Compatibly licensed implementation (I think. @graydon? It's 2-clause BSD)
  • Almost as good a compression ratio as zlib
  • 5x faster decompression than zlib
  • Much faster than snappy, marginally worse compression.

This has two parts:

  • Add LZ4 wrapper
  • Use it in rustc::metadata
@emberian
Copy link
Member Author

emberian commented Jun 2, 2013

I don't know how bootstrapping this change is going to work, either.

@graydon
Copy link
Contributor

graydon commented Jun 5, 2013

I think the eventual ideal move here is to compress each item's metadata and ast separately and fix how we load metadata to only decompress the necessary items. But picking a different compressor, or different encoding, is certainly also fine.

@emberian
Copy link
Member Author

emberian commented Jun 5, 2013

Yeah, transitioning away from ebml would be great. Decoding it and especially converting from big endian is a sore spot. Of course, reading as little endian right now isn't any better because it still does conversion and doesn't optimize for little endian systems, but that optimization is at least possible.

@emberian
Copy link
Member Author

emberian commented Jun 5, 2013

Alright so given the numbers #6954, I don't think LZ4 is worth it, and neither does @brson.

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

No branches or pull requests

2 participants