question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Composer taking a very long time

See original GitHub issue

Hi,

I’m assuming my setup is wrong, but my repo is taking around 25 minutes on each push to upload. I’m assuming this is to do with composer?

on: push
name: Publish Website
jobs:
  build:
    name: Build and deploy API
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2.1.0
        with:
          fetch-depth: 2
      - uses: shivammathur/setup-php@v2
        with:
          php-version: '7.3'
          tools: composer
      - run: composer install
      - name: Deploy website with FTP
        uses: SamKirkland/FTP-Deploy-Action@3.1.0
        with:
          ftp-server: ${{ secrets.FTP_ADDRESS }}
          ftp-username: ${{ secrets.FTP_UNAME }}
          ftp-password: ${{ secrets.FTP_PWORD }}
          local-dir: ./

Couldn’t find any info anywhere.

Thanks, Tom

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SamKirklandcommented, Jul 16, 2020

This action is dependent on github version tracking to determine which files to upload. Untracked files are re-uploaded every time because the ftp protocol has no way of diffing two files (newer protocols give you a file hash and then its as simple as comparing hashes).

You have a few options here:

  1. Switch to a protocol that supports hashing - namely SSH & rsync. You can then use a rsync deploy action to get a true diff-only upload
  2. If you must use FTP you can use the older v2 version of this action - note the parameter names are different. It supports “smart diffing” which tries to only upload different files, I removed this feature in v3 because it can be incorrect if the file was changed but the file size remains the same.
  3. Wait weeks/months until I get a working solution with this action. I’ve been working on a version that uploads a hash for every file so all files only need to be deployed on the initial run.
0reactions
SamKirklandcommented, Jul 16, 2020

I’m assuming the 4th option is simply to track /vendor and drop from action.

Yep! I forgot about that one 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is PHP Composer so slow? - Stack Overflow
It took almost 200 seconds alone, though running it together with other libraries seemed at some times running almost for 12 minutes.
Read more >
Composer install or update takes too long · Issue #7101 - GitHub
It's taking forever to install a package. This is the first time am experiencing this. Need to get on with coding!
Read more >
Composer Update very very slow (not completing) - Laracasts
Composer update is very slow if you have a lot of dependencies/packages implemented. You should avoid variable versions and think about using a...
Read more >
Some tips to help speed up Composer install/update - HorusKol
Keep Composer up to date · Tighten up your project dependencies specifications · Go nuclear · Speed up the download · Get under...
Read more >
Troubleshooting - Composer
It means your network is probably so slow that a request took over 300seconds to complete. This is the minimum timeout Composer will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found