optimizations of overlay rendering