improve drawing performance