Revert '392448-npm-metadata-endpoints-high-cpu-duration'
What does this MR do and why?
!124470 (merged) introduced npm_optimize_metadata_generation
feature flag to put the attempt to cache the dependencies generation behind while generating the metadata for the NPM packages. However, checking the feature flag availability in a loop negatively impacted the metadata generation time.
We received complaints from customers who started to experience slowness and failed responses when trying to download their npm packages.
I benchmarked the GenerateMetadataService
with and without the changes introduced in !124470 (merged) for one of the impacted customers. The difference in real-time is significant:
- without
npm_optimize_metadata_generation
feature flag check: ~ 30 sec - with
npm_optimize_metadata_generation
feature flag check: ~ 170 sec
Both are slow but 30 is better than 170 for sure. An effort to introduce a permanent fix to the issue is in progress:
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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.