[Piuparts-devel] lib/db: sort packages returned by reserve() by importance

Andreas Beckmann anbe at debian.org
Thu Feb 21 18:52:17 UTC 2013


> I've been wanting to do this, but was worried about conversations re
> the delay in calc_rrdep_counts(). Note that it may be sped up ~2X for
> smaller package_names lists by saving rrdep_list and moving some of
> the calculation logic to e.g. waiting_count().
> 
> Maybe more - the algorithm will weed out the high-rdep packages early.

Patches welcome. :-)

I noticed that master is a bit slower now, but
waiting-for-dependency-to-be-tested now quickly drops. So I restricted
rrdep calculation to non-empty lists ... that was OK for now.

Optimizations possible in _find_packages_ready_for_testing:
* DELETE FROM package_names WHERE package_name IN reserved/*.log
* if len(package_names) > config['max-reserved']
so we can amortize the cost for rrdeps over a larger list of packages
(and skip if for small ones where the first slave gets all testable
packages anyway, so order does not matter)

Andreas



More information about the Piuparts-devel mailing list