> 5,000 - 10,000 files works OK, but go further then this and it gets slower 
> and 
> slower as it progresses through the job.
>
> Anyone know why?

Could be anything, as you haven't given us any information about the 
code. For example, are you building up a result variable/array of some 
kind and is this getting very large? Are you forgetting to close files 
or database connections? Is it maybe something as simple as logfile code 
that has to seek to the end of the log each time? We can't tell from here.

I would try getting your app to print out some timing and memory usage 
details at various points, or even better print delta (difference) 
timings between each iteration. You'll find that some bits of the code 
keep running in constant time and other bits slow down, those are the 
bits you need to sort out.

You could also try profiling the script with something like Xdebug 
(http://www.xdebug.org/) for even more detail.

Cheers,

  Julian.

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to