Timings: Aurelia Cli

This post is related to my earlier posting, Timings: Angular Cli, where I time how long it takes to install Angular Cli and create a base solution using the Cli. Here I’ll be running the same tests, as far as possible, with the Aurelia Cli, which can be found over on github

First of all we need to get the CLI:
npm install –g aurelia-cli

At the time of running this test the version of Aurelia CLI is 0.16.1

Install time: 1 minute

Next up is the creation of the base solution:
au new

Aurelia asks a number of questions to configure the solution, a nice touch that both the Angular and the Dotnet CLI could learn from.

Name the app: timings-test
Default setup or customize: selected option 2 – use TypeScript
Create this project? selected option 1 – Yes (Default)
Install project dependencies? selected option 1 – Yes (Default)

Generation time: 3 minutes – I’d like to see this down to around 2 minutes, which (for me) would be far more acceptable; however, this is 2.5 minutes faster than Angular, so not too bad

So how big is the folder?

It’s a little under 16 thousand files (15,937 actually), totalling 124 MB (142 on disk)

That is still a lot of files, and I hope that as the CLI matures and is fine tuned that the time to be up and running is reduced a little and the number of files it has to install is reduced.

In my Angular CLI post I highlighted a could of points; noting that this is still beta software and the use of so many node modules in a given project needs a bit of a shake up. Those points still hold true.

Just as a passing shot: running dotnet new –t web took 1.5 minutes from fresh install. After warm up it took 7 seconds! In the pursuit of fairness I then ran dotnet restore which took 1 minute. And yes before anyone calls foul I do realise that this is not comparing like for like, I know that, however I wanted to point out that a lot can be done far faster than the CLIs being tested and with far less total files. Oh, this solution is 75 files, totalling 673 KB (768 on disk).

That’s about it for now. Thanks for reading and see you next time.

Timing: Aurelia Cli (delayed)

I was hoping to put a post together a post that showed the timings of using the Aurelia CLI (from here) Unfortunately I’m as busy as ever and haven’t had the chance to get round to it so far. In the time since my last post there have been updates to both the Aurelia CLI and the Angular CLI, therefor I think it only fair to run the timings tests on the latest versions of each.

I’ll dedicate a bit of time to this over the next few days, updating my existing post and providing a matching one for Aurelia.

That’s about it for now. Thanks for reading and see you next time.

Timings: Angular Cli

Update 22 July 2016 – Version 1.0.0-beta.10

I have been using beta’s and pre-beta’s of a number of client and server side technologies over the past couple of years. I have been enjoying all of them with the exception of one thing, time to get up and running with the client side frameworks.

Rather then me telling you of my experiences and the struggles of working with pre-release software, I’ll take you through the entire process of going from zero to a base project on Angular 2 using the new(ish) Angular CLI, which can be found over on github

I already had node installed so not exactly zero, close enough though
image

First off we need to get the CLI
image
Note: at the time of running this test the version of the Angular CLI was 1.0.0-beta.8

Install time: 5 minutes – not too bad, but not great. At least I don’t have to do this more than once.
Install time: 3 minutes; this is much more acceptable

Next up is the creation of the base solution that I can then start working with
image

Generation time: 4.5 minutes – for me this is far, far too long. I need to be up and running much quicker than this. So why so long?
Generation time: 5.5 minutes – a whole minute longer!

I revisited this a few times, allowing the cache to “warm up”, unfortunately no change. Creating a new project was always in the 4.5 – 5 minute range. I have to guess that the CLI is not currently utilising any caching; if it were I would expect to have seen all additional runs of ng new to be faster than that initial run. It’s still in beta so that’s ok for now.

So why did it take so long to create the new project? Lets take a look at the folder the new project was created in to try and figure this out.
image

Just in case you can’t read that. Running ng new creates a starter project with a little under 43 thousand files, just to be clear, that’s 43,000 files put on disk, totalling a whopping 168 MB (214 on disk) – wow.
The starter project now contains 41.5 thousand files, which isn’t much better that it was previously, only now it is a total of 194MB (239 on disk) – wow, wow, WOW! What is going on?

Is it just me or does this seem just a little crazy? Do we seriously need all of those files? From my point of view, and a very simplistic answer, is “No, of course we don’t.”

Couple of things to point out here:

  1. The Angular CLI is still in beta, so I am hoping that the overall performance of creating a new project will improve as the project matures and gets closer to RTM. For me project creation has got to be down to a couple of minutes max!
  2. Is the use of NPM all that it’s cracked up to be?
    I use node from time to time and am finding the module system to be getting out of hand. Installing one module results in dozens, if not hundreds, of other modules being dragged in. Some of these modules are single functions that don’t do anything more than to allow developers to be really lazy. Just take a look the the left-pad mess
    The number of files on disk to generate a very simple Angular 2 app is ridiculous. 43 thousand files for what is not much more than “Hello, world” is nonsense. An alternative needs to be found to this. I build lots of projects, real, prototypes, tutorial, etc. and having each one of those take so long to build and use up that much disk space is criminal. Bytes matter people and we need to look back to those dark ages when we had to justify every single byte we sent over the wire. If you are a developer that is building node modules please think carefully about adding dependencies on other modules that themselves have dozens of dependencies. Honestly, sometimes it is better for the community as a whole if you just implement your own left-pad.

In my next post I’ll take a look at the time it takes to go from zero to getting a base project for Aurelia.

That’s about it for now. Thanks for reading and see you next time.