On Sun, Dec 02, 2007 at 01:29:42PM +0100, Nagy Gabor wrote:
Hm. This would be a bit hackish imho. The last step [checkdeps(pkg1, .......... , pkg99)] can be interpreted as a new first step, because nobody can guarantee that adding pkg100 won't break the dependency of pkg60, and we must repeat the checkdeps process. Thus we reached my patch again, or we use old-algorithm, new-algorithm, old-algorithm... no.
I am not sure if I didn't explain my proposal clearly enough, or if I don't understand your objection, but just in case: What I had in mind is to first run the old resolvedeps : this causes 99 checkdeps call, with a one element list.
This gives us the following list : pkg1, .......... , pkg99 Then we run your new resolveps on it, which will call checkdeps as many times as necessary, starting with a list of 99 elements. But in the case of smoke002, it'll call it just once, and see all dependencies are satisfied. So this should give a huge speedup.
And your resolvedeps.py test case should still pass with that method.