Jump to content

Recommended Posts

Its quite a lengthy script which works however when the file is large the server runs out of memory and its running on max memory!

 

I had some code which basically reads and replaces 12500 lines then starts at 12501 til 25000. If this makes sense?

 

I believe file opens the whole file and i think thats what the problem is..  So what i was hoping to find was a func that would alllow this to work without re writing the whole script?

 

Thanks again Phil

reads and replaces 12500 lines ... If this makes sense?

No, that does not make 'computer' sense. After you have a few thousand lines of data, you should migrate it to a database and let the database engine do the work for you.

reads and replaces 12500 lines ... If this makes sense?

No, that does not make 'computer' sense. After you have a few thousand lines of data, you should migrate it to a database and let the database engine do the work for you.

 

That might not be applicable. What if he is writing a script to analyze Apache access logs for instance? What if he is writing the script that is migrating to a DBMS?

 

Check this out:

[daniel@phpfreaks logs]$ wc -l access.log.2009-09-25
681486 access.log.2009-09-25

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.