[performance] improve layout drawing performance