Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
01-02-2006, 03:23 PM #1
- Join Date
- Jan 2006
- Thanked 0 Times in 0 Posts
Need buffering or background task... help
I have a script calling another one which has a loop that is reading a huge text file (actualy 14 Mb) line by line (oin my case more than 55000) , extracts datas and makes an INSERT into a MySQL database.
I optimized what i could but the script still takes about 70 s which is beyond timeout of server and browser.
i also display errors when found during the parsing, so the browser must be active... At the end of the script, i display the result of the parsing (how many fields have been inserted and how many errors)
Depending on browser and server, i have different results in the display. In some configuration i have nothing displayed, with others i have the first line, than nothing, etc..
To keep the browser active, i tried to send some === every x loops to show that something happens, but i'm still not satisfied.
The text file and number of lines can be even larger, so it's a must !
On smaller files, everything works OK.
How can i make that the script continues to run in background and/or make a progress bar that will stop at the end of execution ?
Thanks for any help and a happy new year !