-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Comments
Nominating for milestone 5 (production-ready) |
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. |
Also a production-readiness issue. But we'd like to do it soon! This is a major slowdown in small-file compilation. |
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? |
Triage bump. |
this has been done. closing. |
metadata::decoder::each_path
takes a predicate that determines whether apath_entry
is broken. FIXMEs (formerly XXXes) say "this is awful", but I don't understand the problem well enough to elaborate.The text was updated successfully, but these errors were encountered: