hiqdev / asset-packagist

Asset Packagist
https://asset-packagist.org
BSD 3-Clause "New" or "Revised" License
247 stars 25 forks source link

High memory usage when using a lot of packages #74

Closed schmunk42 closed 4 years ago

schmunk42 commented 6 years ago

The package list is from an educational project which tries to include as many Yii2 packages as possible, it might be useful for you as a benchmarking tool.

composer.json

All values with filled caches...

AP

[6694.7MB/310.05s] Dependency resolution completed in 126.371 seconds
[650.9MB/322.22s] Memory usage: 650.91MB (peak: 6698.12MB), time: 322.22s

fxpio/cap (for comparision)

[643.7MB/40.37s] Dependency resolution completed in 3.530 seconds
[377.3MB/33.04s] Memory usage: 377.26MB (peak: 648.26MB), time: 33.04s
SilverFire commented 6 years ago

Hm... I would like to think it's related to composer internals 😨

schmunk42 commented 6 years ago

I first thought it would be related to optimize-with-installed-packages: false/true, in a way that fxpio/cap would be using far less dependencies to analyze than with AP.

But it did not change the time/memory needed with fxpio/cap. I am also pretty clueless why this is happening.

hiqsol commented 6 years ago

That's because of:

    "pattern-skip-version": "(-build|-patch)"

Some bower/npm packages have really huge number of build/patch releases.

I'm not sure if it's safe to remove these releases from asset-packagist completely.

schmunk42 commented 6 years ago

@hiqsol Nice catch! Even without testing it, this should be the cause.

This is partially related to https://github.com/hiqdev/asset-packagist/issues/67 - in case you start working on this you might consider an URL like https://asset-packagist.org/bower-releases to strip out the build & patch versions.

github-actions[bot] commented 4 years ago

Stale issue message