How to optimize deluge script to run faster

How to optimize deluge script to run faster

Hi, I have a form that is very complex and it require several fields interactions in order to accomplish all customer requirements. 

Currently the script is running well, but it is running very slow. 

Any suggestion on how to optimize it?

Thanks in advance.