Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Tie::File

Status
Not open for further replies.

Spyke212

Programmer
Joined
Mar 15, 2008
Messages
1
Location
GB
Hi,

I have a script that accesses a file using Tie::File, and then loops through all 52,000 lines, analysing the data.
(The file is around 500mb in size)

However, there is a problem, my program gets gradually slower the longer it runs, and after about 2,000 lines it nearly comes to a complete standstill.

I have tried using the memory=> command that accompanies File:Tie, but even boosting it to 10000_00000_0000 doesnt stop it from slowing down.

Does anyone know the reason why?

Many thanks

S
 
Yes, your perl program is doing something very cpu/memory intensive, that is causing it to slow down. Try writing a simpler script and add to it until you get to the point where you program starts slowing down. That should give you a hint where the problem is.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
if you're only reading the file, why use Tie::File, it's a bit overkill for a file that size for that functionality


Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top