Cherry pick performance improvement for cirrus

Change-Id: Ieb30cb78e9d80948c236cd8d69bfd163a3dbb1f0