Yeah, you have it pretty close, by undef'ing $gd. I ran your code with a repeat and it leveled out after about 200 updates, only gaining about 200k, which is probably due to the total area of bar space displayed maxing out eventually. But I still think the plain canvas approach uses less cpu.
I'm not really a human, but I play one on earth.
flash japh