fastcgi FCGX_Accept_r vs FCGI_Accept
pps <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I'd like to ask what's the difference between FCGX_Accept_r & FCGI_Accept?
is it possible that multiple threads will enter while loop of one fcgi
process simultaneously if I use FCGI_Accept?
while(FCGI_Accept()==0){
...
}
what about FCGX_Accept_r?
I'm writing fcgi apps in c++ and I developed my own streambuf. What I
did is to keep internal buffer of streambuf (between requests) and only
resize it if needed.
I use gcc2.95 and in my test app printing a few megs of data is much
faster with cpp streams than using printf(...); Using a non-zero size
buffer for streambuf increases speed (contrary to what I read in
comments of one of the examples - "...the default bufsize (0) ... in
favour of more efficient IO"
i tested with following loop:
for(int i=0; i<1000000; i++){
printf("%i ", i); //for stdio
//cout << i << ' '; //for iostreams
}
cpp version was like 2-3 times faster than stdio. For gcc 3.4 streams
were much slower - almost the same speed with stdio.
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/