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

Remove metadata::decoder::each_path and adjust users to do something else #4572

Closed
catamorphism opened this issue Jan 22, 2013 · 6 comments
Closed
Labels
A-metadata Area: Crate metadata C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@catamorphism
Copy link
Contributor

metadata::decoder::each_path takes a predicate that determines whether a path_entry is broken. FIXMEs (formerly XXXes) say "this is awful", but I don't understand the problem well enough to elaborate.

@catamorphism
Copy link
Contributor Author

Nominating for milestone 5 (production-ready)

@pcwalton
Copy link
Contributor

pcwalton commented May 2, 2013

This function just needs to be nuked, as it's impossible to make fast. It's the source of most of the performance problems when compiling small crates.

@graydon
Copy link
Contributor

graydon commented May 2, 2013

Also a production-readiness issue. But we'd like to do it soon! This is a major slowdown in small-file compilation.

@thomaslee
Copy link
Contributor

Performance issues aside, I have a feeling the "This is awful" comment may relate to the way the original implementation was using a boolean flag as a sort of half-arsed "break" (this must have been written before the "new" for loop syntax). This forces each_path to parse & iterate over every item in an imported crate during decoding even when the predicate returns false. I don't think that's necessary, but my gut says it's unlikely the typical case will be made any faster by cleaning that up.

I'm cleaning up each_path a little while I dig into another, unrelated metadata issue but I'm curious: if we were to nuke this, what would we replace it with?

@emberian
Copy link
Member

Triage bump.

@pnkfelix
Copy link
Member

pnkfelix commented Feb 6, 2014

this has been done. closing.

@pnkfelix pnkfelix closed this as completed Feb 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-metadata Area: Crate metadata C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

6 participants