[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: S.W.O.T analysis
- From: Joshua Jensen <josh.jjensen@...>
- Date: Wed, 19 Oct 2011 12:38:50 -0600
----- Original Message -----
From: Pierre Chapuis
Date: 10/19/2011 11:30 AM
On a Windows machine, the cost of spawning a modern executable (Lua or
whatever) is high. My laptop can spawn 30-40 processes a second. My
fast work machine can spawn 60-80.
The cost of spawning a Lua process is low, so you can afford to spawn
many of them. That makes Lua CGIs a viable choice for a medium-sized
Web application. It's the same thing for Perl, by the way.
Spawning Python or Ruby is more expensive (*), so for some workloads
you will have to choose a more complex model (event-based, workers...).
You could do the same thing in Lua but you don't have to.
Linux boxes can fork many more processes per second.
(I was using a Lua script in Git to retrieve 100,000 files via SHA1
filename through the smudge/clean filter mechanism. At 60 spawns a
second across 100,000 files, this took a LONG time. I hacked the Git
code to load a DLL for the smudge/clean that then ran the Lua script.
It retrieved files as fast as they could be retrieved over the network.)