Shutdown command queue
I'm starting to try and do more things in the __destruct()
function to make things speedy. Thing is, if the object goes out of scope before the buffer gets spat at the browser, it's not going to make much difference.
What I need to do is have a shutdown command queue. That is, these things that want to do things on destruct so they don't impact load times, can register the command in the queue then once the app shuts down and flushes the buffer, these things will execute. That way they should be able to take as long as they want without actually affecting the user experience.
Edited by Jamie Carl