caching, repaint performance improvements