Skip to main content
Eli-zabelle
Inspiring
July 10, 2017
Question

What makes a form slow?

  • July 10, 2017
  • 1 reply
  • 1838 views

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 has been closed for replies.

1 reply

Joel Geraci
Community Expert
July 10, 2017

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.

Eli-zabelle
Inspiring
July 10, 2017

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.

Eli-zabelle
Inspiring
July 10, 2017

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


Initially, I had pretty much all the fields checked on the reset command. I only unchecked a few fields that were static and had no special function, in case it would help.