Peri CGI se perl kai C

Alexios Chouchoulas alexios at vennea.demon.co.uk
Tue Apr 11 14:13:08 EEST 2000


On Tue, 11 Apr 2000, Christos Ricudis wrote:

> 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).

  Einai peripou interpreted glwssa. Sthn arxh tou script o parser metafrazei
to script se endiamesh glwssa gia grhgorh ektelesh. Gia megala scripts, afto
prosthetei gero overhead ston xrono ekkinhshs enos script (to kserw apo
peira, ena Sun 4/310 de xairetai poly otan tou zhtas na treksei CGI me 9-10
MEGALA modules required ston kwdika -- alla afou ksekinhsei, ola pane
kala).

  Me tis kainouries Perl (5.004 kai meta;) mporeis na kaneis compile to
script sou ek twn proterwn se bytecode kai na glytwseis ta (arketa
shmantika, polles fores) overheads. O interpreter ermhnevei byte-code opws
to P-System [1] kai h Java.

  Xrhsimopoieis to B::ByteCode(?), to mod_perl, Linux (gia grhgoro
fork(2)/exec(2)) ki ena grhgoro 486 kai to bottleneck metatopizetai stis
syndeseis me th database.


> 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

  Pragmati. Yparxei diafora apo Perl se C, alla *kai* sth C tha eprepe na
kaneis ta idia pragmata gia na eisai swstos. Kai h Perl einai bolikh gia
CGI.

A.


[1] Hlektroniko loukoumi s'opoion to thymatai. Extra loukoumi s'opoion to
    xrhsimopoihse mesa stous teleftaious eksh mhnes. :-)

=----------------------------------------------= 64*>:00p258**44$$^>4$,1-:#v_v
| Alexios Chouchoulas, the Unpronounceable One | 4$#^; BEFUNGE97 ;^#_@#:-1$>#<
|        http://www.vennea.demon.co.uk/        | 4*2-*26g00*:-*58:<vg3/*48+*:$
=-----=[   `Eimai mia micri soupiera'   ]=-----= #@@@ooo:::...  .    .     .


--
linux-greek-users mailing list -- http://lists.hellug.gr




More information about the Linux-greek-users mailing list