balena-cli/lib/actions
Juan Cruz Viotti 210680c9c9 Lazy load command actions dependencies
In my system (MBPr 13), printing the current version takes over 2
seconds:

```sh
$ time ./bin/resin version
2.4.0
./bin/resin version  1.37s user 0.19s system 73% cpu 2.130 total
```

The CLI takes almost all of these time to parse the dependency tree
before returning control over the actually called command.

To mitigate this problem, we only require the NPM dependencies a command
requires when executing such command, and thus prevent dependencies from
being required and parsed unnecessary.

After this improvement, printing the original example (`resin version`)
returns in less than a second (2x improvement):

```sh
$ time ./bin/resin version
2.4.0
./bin/resin version  0.88s user 0.09s system 102% cpu 0.938 total
```
2015-12-07 11:48:54 -03:00
..
app.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
auth.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
command-options.coffee Add per device environment variable support 2015-05-28 12:32:08 -04:00
config.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
device.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
environment-variables.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
help.coffee Separate general help per topic relevance 2015-10-02 08:50:32 -04:00
index.coffee Implement settings command 2015-11-15 22:08:02 -04:00
info.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
keys.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
logs.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
notes.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
os.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
settings.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00
wizard.coffee Lazy load command actions dependencies 2015-12-07 11:48:54 -03:00