huge time/memory consuming script
| From: | Christian Dechery | Date: | Sun, 25 Mar 2001 15:52:57 +0000 |
| Subject: | huge time/memory consuming script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-45493@lists.php.net to get a copy of this message | ||
I'm thinking about building a PHP script that loads an entire database on a weekly basis, based on a text catalog.
The reason I'm doing it, it's because the catalog is too generic and has lots off stuff to be done in it (such as lots of string replacements and 'fixing') before I can really parse it and create the insert statements.
The doubt I have is this: it's kinda of BIG catalog, I'm talking about more than 20MB of text files, and I have to 'clean' the whole DB and load it entirely again (I don't make the rules, this is how it works)...
I'm worried about the time it will take and the memory it'll cost, so I was thinking of a step-by-step solution, like break the process into several 'steps' that of course would be carried out automatically.
Like I'd have
<?php
do this this this and that
reload the page to go to the next step
?>
So... just by reloading the page, I get a good 'memory cleaning' so I can be sure everything is going to get carried out??... there are steps that I'm worried about taking over 30min to finish, like loading the main table with 140.000 rows...
thanks...
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer