On Wed, Aug 21, 2013 at 10:47:20PM -0400, Corey Richardson wrote:
> - Metadata is scary. It's a hairy part of the codebase that I sure
> don't understand. I know its purpose, more or less, but not the
> specifics of how or why things are encoded. Michael Sullivan could
> speak more to this, he is the last one to have touched it. The
> compiler can't help you when you make a mistake, either.

FWIW, I had a branch that replaced the type encoding part of metadata
with the standard encoder. It did not use an EBML output but rather a
very specialized, minimal encoder. This did not improve compile times,
though. I think the reason was that I never got around to implementing
the "type abbreviations" code that optimizes the case of repeated
types.

Anyway, I still think the best *long-term* fix for making metadata
more approachable and maintainable is to transition to using the
standard encoding stuff. Clearly, we'd need to structure the encoder
so that we first encode an index and then encode the various bits
individually, presumably using gzip.

It is unclear to me though whether this would increase perf -- perhaps
as a side-effect of general rearchitecting. It might also help more in
the general metadata code, where EBML costs something, than in the
type encoding code, which is already pretty specialized.



Niko
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to