[NX-479] Optimize number times rendering is done