build: bail early when verifying dependencies - #4915
Conversation
Skip creating Options for dependency when it's in modules.
|
What problem is this PR solving? |
|
It's a micro-optimization, while also reducing nesting within the function. We don't need to construct Options objects for dependencies that already exists in modules. The closest related issue is probably #4365, but this PR is not solving a specific issue. |
|
OK, I'll merge it, but I'm not sure that random micro-optimizations like this are a good use of anybody's time. (Unless you profiled it, which I doubt you did, else you would have mentioned the speedup. :-) |
|
No, I didn't profile it because I don't think it's worth the hassle. Sorry for the noise, it's a habit of mine which helps me digest code better while trying to understand it. Thanks for the input! |
|
Yeah, we've had contributors in the past who seem to think that the only way for them to understand the code is to rewrite it. But there's a net cost in code churn for those who already understand it, and there's no guarantee that others will benefit (everyone's way of reading code is different). |
Skip creating Options for dependency when it's in modules.