Skip to main content
Eli-zabelle
Inspiring
Jul 10, 2017 2:27 PM UTC
Question

What makes a form slow?

Hi,

I have a document with 120 similar text fields + 20 dropdowns. There is mainly two simple action Javascript  + 1 format script per field. I have a button to reset all fields and it takes up to 20 seconds on a regular performing computer. The action scripts weren't absolutely essential so I've tested the document without them, but nothing changed in the time it took to reset.  Also, when I open the document, it takes quite a while for all the fields to appear.

What are the reasons that can make a document so very slow? Do I have too many fields? Are there other reasons that maybe I could correct? Thank you.

I have Adobe Acrobat Pro DC.

This topic is closed to new replies. Start a new post to keep the conversation going.

10 replies

Joel Geraci
Community Expert
Community Expert
Jul 10, 2017 3:21 PM UTC

You haven't posted the for so this is only a guess but I'll bet the code isn't optimized and there are a ton of string literals in it.

Add the line...

this.delay = true;

... at the top of your reset script and then.

this.delay = false;

... at the end of your reset script.

This will stop the form from redrawing the fields as it's being reset. That may give you a performance boost.

Translate
Eli-zabelle
Inspiring
Jul 10, 2017 5:04 PM UTC

Hi Joel,

On my reset button properties, I used the command Reset form and checked the fields I wanted to reset.

Now, to use what you suggested, I wrote a script instead of the command using this.resetForm with each of the seven parent fields.

Example :

this.delay = true;

var a= this.getField("Ville4L");

this.resetForm(a);

this.delay=false;

Is this how I'm suppose to write it? Because it did reset my form, but took even much longer!

thanks.

Translate
Joel Geraci
Community Expert
Community Expert
Jul 10, 2017 6:05 PM UTC

Did you want to reset the form or just a few fields?

Translate