Modify the attribute values using python

Hello!
Using the same method to modify property values in different components, why does one freeze and the other can run smoothly?
Does anyone know how to solve this problem, adding multiple such components to the layout will seriously affect the simulation results.
Attached is a layout and demo video.
thank!

The first upload was wrong. Upload again.

I don’t know why, the upload has been failing.

Instead of .rar file try attaching .zip file.

But I failed to upload .mp4 and .vcmx, but the problem has been solved, thanks!