6

Things you can do while npm/yarn install is running -
- Take a nap
- Go for a walk
- Read something
- Check social media
- Listen to music
- Watch videos

Comments
  • 5
    - read through all 6 million Wikipedia articles
    - visit Mars to grow some potatoes
    - master playing Liszt's etudes for piano with your toes so you have your hands free to practice Paganini's Caprice counterparts on the violin simultaneously
    - explain monads to a 6 year old
    - watch a clump of tar trickle out of a funnel
    - visit southern France to watch the construction of the first power-producing fusion reactor
  • 1
    If you think npm is slow try Composer.
  • 2
    @TobiSGD composer is usually faster because packages tend to not depend on 15.000 dependencies.
  • 2
    @PrivateGER Try an update of a Magento instance, even minor ones, like from 2.3.2 to 2.3.3, need forever just to calculate the dependencies.
  • 2
    @PrivateGER

    composer install is fast... composer update is fast.... EXCEPT if you have dozens of packages with "dev-master" as a constraint.

    If you require "^1.0.0", it can just check which tagged releases within that constraint range are compatible with your setup.

    Those checks are permutations: If you use PHP 7.1, there's a specific range of versions where a package might have become compatible, and stopped being compatible -- and the same goes for all other dependencies and sub-dependencies.

    Luckily, composer has a cache.

    But with non-tagged versions, it has to resolve through all possible versions -- which in that case means all possible commits. Unbounded in both directions.

    That set of "all commits" tends to be extremely large compared to the set of "tagged releases", so you get an explosion of permutations which have to be compared with each other.
Add Comment