Peri CGI se perl kai C
Christos Ricudis
ricudis at paiko.gr
Tue Apr 11 00:14:07 EEST 2000
Hello Linux-greek-users!
On 10 Apr 00, Linux-greek-users wrote to George Daflidis-Kotsis with subject
"Re: Peri CGI se perl kai C":
>> Nomiza oti to mod_perl sikwnei kommatia tou interpreter tis
>> perl mazi me ton apache (poly xontriko approach profanws),
>> kanontas etsi tin ektelesi twn perl cgis pio grigora.
>> An kanw lathos tha einai poly endiaferon na to mathw.
>>
>> Thanks. An pali ayto pou nomiza gia to mod_perl isxyei,
>> paramenei to dilimma :-)
L> Xwris na gnwrizw auto pou les, skeftomai to e3hs:
L> An isxue auto pou les, tote giati sthn arxh twn perl cgis
L> e3akolou8oume na bazoume #!/path/to/perl kai kuriws giati
L> otan ekteleitai to cgi apo ton server sto process table
L> blepoume /path/to/perl /path/to/script.cgi ?
Profanws epeidh kanenas den eipe ston apache oti prepei na treksei to
programmataki xrhsimopoiwntas to mod_perl?
aside :
1000 invocations toy hello world se C pairnoyn 11.313 seconds mean time (std
dev 0.104)
1000 invocations toy hello world se perl pairnoyn 20.100 seconds mean time (std
dev 0.238)
H diafora yparxei, alla an o kabrianis katalabe me to mati th diafora metaksy
0.011 kai 0.020 seconds, egw 8a paw na ginw kalogia sto timbuktu. Opoiadhpote
shmantikh diafora yparxei sthn taxythta metaksy C kai perl cgi-scripts mallon
ofeiletai sto gegonos oti h perl einai interpreted glwssa, kai oxi sto oti
prepei na shkwseis ton interpreter (osoi kseroyn pws ginetai to demand page
loading sto linux 8a katalaboyn giati).
Wstoso mesa sto overhead toy http transaction, kai tou database transaction poy
ginetai apo pisw, nomizw pws opoiadhpote diafora mallon 8a xanetai sto 8orybo.
Gnwmh moy einai oti perissotera 8a kerdiseis an xrhsimopoihseis kapoia me8odo
gia persistent database connections sto cgi script sou (eite fastcgi, eite IPC
se ena programmataki poy ka8etai kai kanei serve requests gia to CGI sou), para
apo to na ksanagrapseis to CGI se C
--
Christos Ricudis
Boh8a ena an8rwpo kai 8a se 8ymh8ei.
Thn epomenh fora poy 8a xreiastei boh8eia.
--
linux-greek-users mailing list -- http://lists.hellug.gr
More information about the Linux-greek-users
mailing list