composer: Composer very slow to read & write cache files
When I run
composer update --profile --vvv
I get the following output: https://gist.github.com/tnorthcutt/770ba18a3f3f182354d85b7c80a91fe1
The dependency resolution itself is very fast, and (in this case) no packages are installed, updated, or removed (because I previously ran composer update
). However, reading and writing the cache files seems extremely slow.
Is there something I can do to speed this up, or to further debug?
My composer.json
:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"laravel/cashier": "~7.0",
"laravel/spark": "*@dev",
"yab/laracogs": "^1.9",
"hashids/hashids": "^1.0",
"barryvdh/laravel-cors": "^0.8.0",
"barryvdh/laravel-debugbar": "^2.2",
"barryvdh/laravel-ide-helper": "^2.1",
"doctrine/dbal": "^2.5",
"spatie/laravel-collection-macros": "^1.4",
"league/csv": "^8.1",
"guzzlehttp/guzzle": "^6.2"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*",
"phpmd/phpmd": "@stable",
"spatie/laravel-migrate-fresh": "^1.3"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan ide-helper:generate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
},
"repositories": [
{
"type": "path",
"url": "./spark"
}
]
}
Output of composer diagnose
:
Checking composer.json: WARNING
require.laravel/spark : unbound version constraints (*@dev) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys: FAIL
Missing pubkey for tags verification
Missing pubkey for dev verification
Run composer self-update --update-keys to set them up
Checking composer version: OK
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 49 (19 by maintainers)
This problem still exists for me, and none of the issues raised in this issue, does not resolve my problem.
same problem in docker arquitecture (php container 1GB ram and 4 cores)
restarted pc and rebuild docker image now
so maybe you were right
kernel host problem probably…
For me it’s always very slow, I tried to search everywhere without much success. I can’t pinpoint what’s the culprit, the download is most of the time slow, but sometimes it doesn’t seem to be any network activity or CPU for that matters and composer just stays there.
It’s normally slow, today is super super slow… maybe it’s a temporary thing.
-v
hangs onWriting /Users/ariel/.composer/cache/repo/https---packagist.org/packages.json into cache
but that mustn’t take that long.I am running 1.4.2 and PHP 7.0.18, no container, OSX 10.12.5, SSD drive, FileVault enabled. Any help here?
@tnorthcutt I see you’re using Loading plugin Hirak\Prestissimo\Plugin in there, can you profile the same without the plugin? Also can you tell us what IP your DNS resolves packagist.org to and where you’re located?