sarugaku / resolvelib

Resolve abstract dependencies into concrete ones

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lazy-evaluate `is_satisfied_by`

uranusjr opened this issue · comments

Context: pypa/pip#7966 (comment)

I think it is theoratically possible for the resolver to not process the candidate list immediately, but to simply add a “filter” thing on it, and check is_satisfied_by on a candidate only if it ever needs it (because all candidates with higher preferences don’t work). This would probably make the things a lot of complex than they are right now, but it sounds like a good thing for performance as well.

We went a different route instead, by making find_matches() return a lazy sequence.