Ember with Yarn vs NPM

I hear a lot of good things about yarn’s performance (among other things) so I put it to the test. I created a new ember app, then ran npm install, then repeated the step using yarn install instead. To compare the caching performance (if any) of each tool, I deleted node_modules and re-ran the commands.

Performance with NPM — First Run

Minutes           : 3
Seconds : 42
Milliseconds : 338

NPM Performance — Second run

Minutes           : 3
Seconds : 42
Milliseconds : 786

Yarn Performance — First Run

Minutes           : 3
Seconds : 37
Milliseconds : 382

Yarn Performance — Second Run

Minutes           : 1
Seconds : 56
Milliseconds : 607

Conclusion

First runs of both tools were pretty much identical. The second run of NPM had zero improvement but Yarn’s second performance was almost 2x faster than the first run.

How I Tested

ember new myapp --skip-npm
cd myapp
npm install

I am using windows powershell, so I timed the executions of npm and yarn with

Measure-Command {npm install | Out-Default}
Measure-Command {yarn install | Out-Default}

PS

I haven’t really dug deep into yarn vs npm, so take these results with a grain of salt. I just wanted to do a “real world” test to see if I can justify moving to yarn.


Originally published at Emad Ibrahim.