Cache dependencies when generating npm packages metadata
Context
During the investigation of #392448 (closed) it was revealed that a lot of entities get pulled from the database while generating a metadata for npm packages.
The issue specially affects users with a lot package versions.
While we're iterating over packages in batches we might load the same Packages::Dependency
entities from the database for every batch.
What does this MR do and why?
This MR introduces a cache for Packages::Dependency
to persist the dependencies when iterating over batches of packages.
Screenshots or screen recordings
No.
How to set up and validate locally
I'm not quite sure how it's possible to test it locally.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #392448 (closed)
Edited by Dzmitry (Dima) Meshcharakou