On Wed, Sep 14, 2011 at 12:04 PM, zsxxsz <[email protected]> wrote:
> == Quote from Nick Sabalausky ([email protected])'s article
>> "zsxxsz" <[email protected]> wrote in message
>> news:[email protected]...
>> > == Quote from Adam Ruppe ([email protected])'s article
>> >> zsxxsz wrote:
>> >> > I think the cgi module is lower effecient.
>> >> That's not really true. The reason CGI has a perception of being
>> >> slow is because it's used by slow languages most the time, but with
>> >> D, it's fast.
>> > I don't think so. Because I've been using C to write cgi. One http request
>> > one
>> > fork cgi which is the reason of slowly performance cgi. The fork process
>> > is
>> > expensive for any OS.
>> Accessing a DB, using JS, and sending a page across the internet are all
>> far, far slower than forking.
>
> I've make a test that forking 1000 processes to execute 1000 tasks on Linux, 
> which
> cost my all CPU and the load average is high. But when use thread pool to 
> execute
> these same 1000 tasks, the CPU cost and load average are more slower.
>

You're better off being event based than either of these options, fork
per request is broken but so is thread per request.

Reply via email to