libraries.io
libraries.io copied to clipboard
Introduces BulkVersionUpdater to fix Version read/write N+1s in PackageManager::Base
these changes take a cold update of npm/gatsby
from 67 sec to 34 sec for me locally (down from 83 min originally, before https://github.com/librariesio/libraries.io/pull/3267)
- replace VersionUpdater with BulkVersionUpdater, which does all the version upserts in one query (accompanied by manual callbacks)
- remove the uniqueness validation on Version for [:number, :project_id] because we have a unique index on those columns