I have a dynamic form that I have built using Designer as part of LC ES3. It has a lot of complex dynamic forms and complex exclusion groups, which get triggered when the form is starting up. This causes the form to take some time to load. In order to disable the exclusion group calculation field from being triggered during start up (as it isn't needed at that time as form validation is done when the user clicks a button) I have created a form variable called formStartingUp and on the root node initialise event I set the formStartingUp.value = "true". In the docReady event I set the formStartingUp.value = "false". The exclusion group function is then only allowed to run when the formStartingUp.value == "false".
Now this does work and makes a massive time saving, 10+ seconds on start up, and this isn't the problem (although I will welcome any thoughts on a better way to do it). The actual problem is this: when the form is rendered it displays a yellow banner across the top of the form saying: "Data from this site is blocked to avoid potential security risks. If you trust this document..." and I have an option to trust the document. When I trust it, the form is reloaded.
However when I check the form and run the validation, the exclusion group functionality isn't being run. When I check the console I get a ReferenceError: formStartingUp is undefined error message.
I have been trawling the forum's hoping that someone else has had a similar issue with no joy, so I thought I would ask here and see if someone can help. Unfortunately I can't post the form as it is confidential.
I will not comment about the performance aspect, since I've limited visibility about rest of your scripting.
However if you get that yellow trust bar while opening the form in Adobe reader, it means that either your form is accessing some data from a data connection to a remote server, or the form itself is downloaded from some remote server.
You could place cross domain file on the server (since i assume you will not have a control of all client machines to have them trust a host in advance).