On Mon, 16 Apr 2007, Robin Houston wrote:
I think you may be over-estimating the cost of forking. I just did a little test, and my G4 Powerbook can spawn and reap 90,000 processes per second. Your computer is probably faster than mine, and I wonder how many times you press space every second. :-)
I'm mostly concerned about the disk I/O needed to load up the command interpreter, plus the CPU time for the interpreter to initialize itself. My MacBook Pro is pretty disk-bound; I already get major slow-downs when I'm doing something disk-intensive. Sure, most of the time the interpreter is going to be in the disk cache, so no hit. But if I'm trying to edit a file while running a big compile job, well...
It seems to me that spawning a new process for (on average) one out of six keystrokes is excessive. Just sayin'. :-)