]> git.lizzy.rs Git - rust.git/commit
auto merge of #8745 : brson/rust/metadata, r=cmr
authorbors <bors@rust-lang.org>
Sun, 25 Aug 2013 20:36:14 +0000 (13:36 -0700)
committerbors <bors@rust-lang.org>
Sun, 25 Aug 2013 20:36:14 +0000 (13:36 -0700)
commit491bc3568c87dadaba4d342135bd308961c6e0ef
treed3d99d9c97e2de40a5f16cd0c2ca9feee9cdf891
parent05f1bbba16912f63b562a7847801823872f89ec6
parent022f188a08b11234b2a5fbce3484d233625371c1
auto merge of #8745 : brson/rust/metadata, r=cmr

This does two things: 1) stops compressing metadata, 2) stops copying the metadata section, instead holding a reference to the buffer returned by the LLVM section iterator.

Not compressing metadata requires something like 7x the storage space, but makes running tests about 9% faster. This has been a time improvement on all platforms I've tested, including windows. I considered leaving compression as an option but it doesn't seem to be worth the complexity since we don't currently have any use cases where we need to save that space.

In order to avoid copying the metadata section I had to hack up extra::ebml a bit to support unsafe buffers. We should probably move it into librustc so that it can evolve to support the compiler without worrying about having a crummy interface.

r? @graydon
src/librustc/driver/driver.rs
src/librustc/metadata/decoder.rs
src/librustc/metadata/encoder.rs