Other Pineapple Smurf
Honorary Master
- Joined
- Jun 21, 2008
- Messages
- 14,593
That's what I currently used it for hehehe.
In the loop I am removing some pipes and funny character from a string begotten from the api loop runs for 300 currency items lel.
Clearly not efficient so I'll be "optimizing tonight"
Quicker to throw more resources at the problem (RAM, CPU, disk) than to optimise. Increase the timeout if you have to and to improve user experience flush progress output if you want.
Trust me, 300 is peanuts. Worry about it when it hits 1 million. I always say cross that bridge when you get there as I see developers spend too much time trying to optimise that they end up writing voodoo code that is impossible to debug or expand. I see them waste weeks on code that never sees the volumes they say it will.
The best way to handle long running processes is to do them as an async service or as a cron job.