optimize package list with lots of packages, RT#28526