Hi hamid,
use shift registers instead of local variables:

This way your example seems to run with perfect iteration times.
(There are no DLL calls in your example, so I don't get the full picture from this VI…)
Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019