[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Ineffektiv perlcode



Peter Maersk-Moller <sslug@sslug> writes:

> Hej
>
> Mogens Kjaer wrote:
>> Peter Maersk-Moller wrote:
>>> Hej.
>>> Jeg har nogle cgi-script i perl, hvor jeg genererer nogle websider
>>> ud fra bla. databaseudtræk f.eks. en kundeliste etc.
>>> Imidlertid er min tilgang til det ikke særlig effektiv idet
>>> udførelsestiden som udtryk for mængden af data ikke stiger linært,
>>> men ekponentielt eller sådan noget.
>> Er det reelt et problem?
>
> Ja, for 100 records tager det måske 10 sekunder at generere siden.
> For 200 records tager det måske 40 sekunder uden at det er præcist
> angivet. for 300 records tager det lang tid og for flere timer
> forbindelsen ud.

300 records lyder altsaa ikke af saa meget, hvor mange
tekstoperationer laver du per record?

Jeg proevede at teste forskellen paa $x.='x' og $x=$x.'x', og der
kunne jeg uden problemer lave 40000 sammensaetninger af tekst paa kort
tid paa en gammel Pentium MMX, det som begraensede mine tests var
Perl-processens ram-forbrug. (Resultatet var forresten af $x=$x.'x'
ikke blivere langsommere selvom $x er stor.)

Jeg tror du skal kigge efter en anden grund til de langsomme
koeretider, kunne det taenkes at det er et problem med ram-forbrug?

-- 
Kim Hansen


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-10-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *