Jump to content

Is it just me, or is composer / packagist.org super slow


sKunKbad

Recommended Posts

I've got my own proprietary framework. I call it Brain. It uses composer, and installation is done with a single composer file, which is handy. Here's an example:

{
    "name": "skunkbad/brain-test",
    "description": "My Awesome App",
    "license": "proprietary",
    "minimum-stability": "dev",
    "repositories": [
        {
            "type": "hg",
            "url": "ssh://hg@bitbucket.org/skunkbad/brain"
        }
    ],
    "require": {
        "skunkbad/brain": "default"
    },
    "scripts": {
        "post-install-cmd": "Brain\\Statics\\BrainInstallScript::run"
    }
}

Brain has it's own dependencies, which aren't all really dependencies, but I've added them all to its composer.json file so I get everything I want for a new project. Here is it's composer.json:

{
    "name": "skunkbad/brain",
    "version": "1.0.0",
    "type": "framework",
    "license": "Proprietary",
    "authors": [
        {
            "name": "Robert B Gottier",
            "email": "xXxXxXxXx@gmail.com",
            "homepage": "http://brianswebdesign.com",
            "role": "Developer"
        }
    ],
    "require": {
        "pimple/pimple"          : "v2.0.0",
        "swiftmailer/swiftmailer": "v5.2.0",
        "dompdf/dompdf"          : "0.6.1",
        "phpseclib/phpseclib"    : "0.3.6",
        "stripe/stripe-php"      : "v1.15.0",
        "firephp/firephp-core"   : "dev-master",
        "doctrine/dbal"          : "v2.4.2"
    },
    "autoload": {
        "psr-4": { 
            "Brain\\": "/",
            "App\\": "../../../App/"
        },
        "classmap": [
        	"Statics/"
        ]
    }
}

In Windows terminal, I can run composer install or composer install --prefer-dist, and it seems that especially when the doctrine packages are being downloaded or cloned (whatever it does), its super slow. Some of them hang for so long that occasionally the terminal will give me a message indicating a particular package timed out (5 mins).

 

So I was wondering if this is just the norm. Feels like I'm on dial-up, but my internet connection is Verizon FiOS (fiber optic). Here is an example of the time-out message I get from Composer:

 

 

Failed to download doctrine/common from source: The process "git clone --no-checkout "git://github.com/doctrine/common.git" "C:\XXXxxx" && cd /D "C:\XXXxxx" && git remote add composer "git://github.com/doctrine/common.git" && git fetch composer" exceeded the timeout of 300 seconds.

 

I timed my install, and composer/common actually hung for about 7 mins. Total time was 9.5 mins.

Link to comment
Share on other sites

Yes, composer often takes along time to complete dependency resolution and installation. It's quite normal.

 

On a side note:

 

Brain has it's own dependencies, which aren't all really dependencies, but I've added them all to its composer.json file so I get everything I want for a new project.

That's not how to do it. You should create a "standard-project" repo or similar and have it pull all the dependencies including this "brain" framework you speak of.

Link to comment
Share on other sites

Yes, composer often takes along time to complete dependency resolution and installation. It's quite normal.

 

On a side note:

 

 

That's not how to do it. You should create a "standard-project" repo or similar and have it pull all the dependencies including this "brain" framework you speak of.

 

Hey, that's a great idea. Of course you knew that ...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.