Client-side performance fix for painting