drawing optimizations