You're perfectly right, the outine in itself works perfectly right; the problem is most due to the garbage collector thread, that consumes too many resources, especially in the morning when all the systems are starting up and some of them have strict time limitation (the cloud named school does not accept delays ;) )
'Just because nobody complains doesn't mean all parachutes are perfect.' Benny Hill