andrewgleave/TextGlowDemo — pull request #2 by ayoy (2011-10-15 21:33:21+00:00)
Title: Drawing performance improvement

* Color space is created in -initWithFrame: and released in -dealloc
* CGColor is recreated with every glowColor change
* Removing these operations from -drawRect: significantly improves
drawing performance

-----

Hi Andy,

I know it's been a while since you wrote this, but anyway you might be interested in this small improvement.
I'm using your label to display values highlighted on a plot during panning a marker across the graph. In that case label text is updated very often. I noticed that by moving CGColorRef creation outside -drawRect: I managed reduce the amount of time spent on drawing the label around 5 times.

Thanks for the great work!
Dominik