libraries.io icon indicating copy to clipboard operation
libraries.io copied to clipboard

Introduces BulkVersionUpdater to fix Version read/write N+1s in PackageManager::Base

Open tiegz opened this issue 7 months ago • 0 comments

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

tiegz avatar Dec 01 '23 22:12 tiegz