this is a back up script.
are there any other issues with vcenter unrelated to the script that you are experiancing?
I would concentrate on the source storage and destination storage.
here is how to check latency
http://sparrowangelstechnology.blogspot.com/2012/08/check-esxi-hosts-disk-latency-storage.html