From f7db389755e47d7766464728e14894740a56fd9d Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Fri, 5 Jun 2015 22:47:16 -0700 Subject: [PATCH] add motivation --- readme.markdown | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/readme.markdown b/readme.markdown index 75193eb..edd45a6 100644 --- a/readme.markdown +++ b/readme.markdown @@ -20,7 +20,25 @@ The commands are: Use "lucifer help [command]" for more information about a command. ``` +### Why? + +Node's `require` is [really, really slow][slow]. If you need to load a large +app with an unfortunately large number of dependencies to run your test suite, +you're looking at a 5-10 second penalty to run a single test. + +Instead of requiring every file every time you want to run your test suite, +load all of them once and listen on a socket for incoming test run requests. + +##### But a long running server won't take into account the changes I make + +Yes! Luckily it's not too difficult to invalidate the Node cache for a module. +If you call `lucifer invalidate [file]` the binary will make a request to the +server to invalidate the cache for that module; this way you can ensure the +server is running tests against the version of the module on your file system. + ### Install Run `make install`. You'll want to have Go installed to install the command line client. + +[slow]: https://kev.inburke.com/kevin/node-require-is-dog-slow/