2

I have a big LiveCycle form that's loading like a pig. It weighs in at 620KB with ~1500 lines of Javascript. No server involved - this is loading a pdf (XDP format) into Reader on the client.

enter image description here

The load time is over 30 seconds. However 25 seconds of this seems to be Adobe Reader doing, well who knows? The flow as described by Adobe seems to be.

Here is my self-created log file (the first bullet points, the time is MM:SS:milliseconds)

28:07:350 **First Initialization

  • Triggered by an 'initialize' event tied to the first field element that gets called (determined through trial and error)
  • For these four seconds I do some initialization and walk the object hierarchy tree*

28:11:597 Form initializations starting

  • Done with my initial stuff
  • For next 25 seconds I have zero, I mean no initialization calls tied to objects in the object hierarchy
  • What is Reader doing?

28:36:531 Form validation occurring

  • Triggered by the first 'validation' event - so no initialization is over
  • Turns out this is real quick

28:36:575 Form initializations complete

  • 'Form:ready' -- ready to run

Thanks for any and all ideas!!!

(Btw, I have a another, similar form I'm creating at 420KB/1500 lines of Javascript that fully loads in under 5 seconds!)

*A neat trick I haven't seen before. I do a lot of hiding and showing of subforms (e.g., a tab bar, radio button sensitive showing of subforms, etc.) but want to keep the native validation working. Turns out that a field in a hidden subform that is mandatory for validation will still be triggered. So you have to turn off that validation check when you hide a field. More work, but the default validation now works!

Peter Gaston
  • 176
  • 13
  • Which Reader version are you using? Besides that, you might change the validation to test whether a particular field is in actual use (definitely not the case in a hidden subform). – Max Wyss Apr 15 '16 at 21:48
  • Reader - I generally test w/ (the latest) Acrobat so I get a console window, though I do final test in desktop Reader (I'll check on version, but latest) – Peter Gaston Apr 16 '16 at 22:01
  • **I made some major headway today**, turns out that any field with validation calls some added script inside ColorFieldsValidation (code added when you want to do validation), even during initialization. (And even if global validation turned off - go figure!) By putting a flag in 2 function calls in their code to immediately return if during initialization I reduced load time by 50%. So making progress!!! (I have found another bug before, still in there in that code btw, so definitely further suspicion in that area.) – Peter Gaston Apr 16 '16 at 22:11
  • Btw - thanks! I'll try that next, i.e., as soon as possibly in initialization sequence I'll turn everything that validates off (fyi, turns out checkboxes need to be handled differently than the rest of the fields) – Peter Gaston Apr 16 '16 at 22:21
  • Just FWIW, you can activate the Console in Reader as well (JavaScript tab in the Preferences); you will get error messages, but you can't (of course) run scripts – Max Wyss Apr 17 '16 at 08:50
  • Do you have any tables with subforms in any of the cells? If so, you'll find your form spends a lot of time rendering them. – JeremyP Dec 11 '17 at 14:30
  • Thanks - though somehow I got it done to about 3-4 seconds - I track religiously now.. When I remember exactly what the breakthrough was I'll get back to you. Pretty sure it had to do w/ validation. Btw, I cache all state on every field now so I can better control when each field validates - crazy - but now hidden fields can still validate (hidden tabs, say) – Peter Gaston Dec 11 '17 at 17:51

0 Answers0