Peri CGI se perl kai C
Michalis Kabrianis
kabrianis at hellug.gr
Tue Apr 11 00:48:38 EEST 2000
> 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.
Gamwto :-(
Gi ayto kai mono tha aksize na tin eixa katalabei.
> 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
>
Thanks. Pantws, pliroforiaka, to script exei dyo stadia.
Sto ena kanei (1) connect, (2) select, (3) kati diergasies edw, (4) print sto
output, (5) insert, (6) disconnect kai sto allo kanei (1) connect, (2) select,
(3) kati diergasies, (4) ksana select, (5) print, (6) update, (7) disconnect
trexontas kanonika (me to xeri) locally, exei poly kali taxytita.
Otan kaleitai me parametrous pou to stelnoun sto prwto stadio, exei
ikanopoiitiki taxytita (nomizw). Otan kaleitai me parametrous pou to stelnoun
sto deytero stadio, einai poly argo.
Tha ksanakoitaksw ton kwdika mia kai den apokleietai na exw kanei kapoia
blakeia (version 0.3 einai :-) kai tha prospathisw na kanw pio swsto /
grigoro to transaction kai an den bgei akri (pou den nomizw oti tha bgei) tha
sas ksanaxtypisw :-)
> --
> 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
Michalis Kabrianis
kabrianis at hellug.gr
--
linux-greek-users mailing list -- http://lists.hellug.gr
More information about the Linux-greek-users
mailing list