Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Memory Hog Code - Where's the Pileup?

by vek (Prior)
on Nov 03, 2005 at 05:16 UTC ( [id://505225]=note: print w/replies, xml ) Need Help??


in reply to Memory Hog Code - Where's the Pileup?

I don't think line 97:

open ( my $infile, "/www/cgi-bin/udr/data/$market.$form.csv" ) or die +"$market.$form.csv: $!";
is your problem because that line is only opening a file and creating a filehandle. No actual data from the file has been read at that point.

I don't see anything instantly wrong with your code that would cause the memory problems you describe. dragonchild does raise a good point regarding your usage of Tie::File as perhaps being overkill for what you're doing. Try performing the header code yourself and see if that improves memory usage. You'd at least know if you'd been bitten by the tie memory leakage problem dragonchild describes.

-- vek --

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://505225]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-25 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found