This post is full of great general advice that's not specific to Node. In Ruby-land, we've been talking about the same things for the past few years, complete with 'omg how many stat calls are we making again?'
I'm sure others were doing the same before Ruby too. The wheel keeps turning...
I worked on a perl application server for a big ecommerce company. We'd stat so many files. Pulling in the meta-object library ('use Moose') was guaranteed to make your program take a long time to start.
The core issue is that Rubygems adds the `lib` directory of every gem to your path, so you end up calling stat a zillion times.
I am admittedly a bit out of the Ruby loop these days, so it's possible that this has been improved. The fastest way of course is to not load a zillion gems...
I'm sure others were doing the same before Ruby too. The wheel keeps turning...