[major] Working on optimizing package resolving