technomancy/leiningen — Issue #335: Cake manages faster I/O when testing
Author: amalloy
Created: 2011-11-22 00:08:14+00:00
State: open

https://github.com/amalloy/jiraph/tree/lein-tests is a version of Jiraph I was working on that prints loads of output to stdout while testing. When using cake, these tests run in about 22 seconds; with lein it takes 55 seconds. If I remove the debug output, cake runs in 12s and lein in 7s, so cake is taking 10s to print and lein 48s.

I speculate that this is because cake runs the tests in a with-out-str context, then prints the output for each namespace in one go (more or less; I'm pretty sure it's more complicated than that but @lancepantz would be the one to ask). It looks like lein is printing and flushing to stdout as it runs, and so spends a lot of its time blocking.