reduce the call to dirty (#12475)
reduce the call to dirty (#12475)

* reduce the call to dirty

* .

* Apply suggestions from code review

Co-authored-by: Raanan Weber <59bd0a3ff43b32849b319e645d4798d8a5d1e889@raananweber.com>

Co-authored-by: Raanan Weber <59bd0a3ff43b32849b319e645d4798d8a5d1e889@raananweber.com>
RaananW/Babylon.js,BabylonJS/Babylon.js,BabylonJS/Babylon.js,RaananW/Babylon.js,RaananW/Babylon.js,sebavan/Babylon.js,sebavan/Babylon.js,BabylonJS/Babylon.js,sebavan/Babylon.js