On 31 May 2006 08:21:03 -0700, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
why are you doing CGI in C? you can get the same code written much faster in Perl. And if you need speed, you can migrate that same code to running under mod_perl, and then it'll be FAR faster than forking a separate process for a C program each time.
1. Why in C? To keep it drastically minimal. Yes, in my case, it is worth to take all that time to get the app done in C (no UTF etc). Kernel is in C and I want to learn both of them. Look at this in terms of "people who like to hack". 2. Why not Perl? I do love perl. Perl is ok. But I do not like the idea of calling libperl plus dbi stuff with every request as I will have enough overhead with other parts of the app. Perl will be used only for internal pages, the ones used not too often. 3. Why not mod_perl? I do not like idea of debugging in the pool. Standalone does not represent the real life env. I do not want to create some add-on just to test it right. I want to keep it simple as its me who is too stupid for the right way to debug. Besides, I do not need to have compiler inside my httpd. No way. I am not saying that I do not trust OpenBSD. I do not trust myself in this aspect. 4. Forking FastCGI will solve this if this will be an issue. Before that, I put high hopes into mfs. And if processes are light and fast, they rotate fast too ( or so I believe ). I wrote all this to show respect for the long replies that I get about the topic. Sorry for resources used. Please take no offense, if some of my questions or statements are stupid for you all being experts.