Optimize ECG animation