Slow loading form has trouble switching from edit to insert mode, cause duplicates

I have a single record form in a grid iframe link with edit and add new buttons enabled. In the deployment environment the form loads very slow on either edit or add new. If I click edit, and while waiting for the processing animation to finish, then click add new, the last record I was editing is populated on the insert mode of the form with the add button available to commit the record. If I click add I just duplicate the record I had in edit mode before I clicked add new. Is there some way to prevent this from happening. Although it might be hardware speed/php config issue on the deployment server, this still seems like a bug. Lack of speed shouldn’t cause a form to behave incorrectly.

I know this might seem like,
Patient: “Doctor, it hurts when I do this”.
Doctor: “Then don’t do that”.

The common end user won’t be able to understand what’s going on and will end up duplicating the record. Anybody have any idea about what’s going on here?

Am I understanding it right, your production environment reacts differently then the development? Can you install wamp or something similar local and deploy to see if the problem occurs there too? Could there be some ‘fallen bits’ while uploading?