PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/ __________________________________________________________________
We did have a relatively complex form where the execution speed of any Acrobat 6 version of any kind on any platform was simply unacceptable. The form had been developed under Acrobat 5. It does quite a bit of processing fields (looping through a tabular form and work on the individual lines). Actions which took about 2 seconds under Acrobat 5, took 40 seconds under Acrobat 6.
We had similar experiences too, and there were reports about such drastic performance drops out there.
Being a very "high-profile" application, this form did get a close look by Adobe (there are sometimes cases, where a software company better does look at things...), and the cause of the problem was found. It was not really in the code of the form (which can be considered "best practice" level), but in a feature in Acrobat 6 which makes it spending a lot of time on refreshing appearances during the processing of JavaScripts.
There is no immediate remedy for this (it most likely would require a complete reworking of the relevant parts in the Acrobat core), but there is a workaround. In agreement with my contacts at Adobe, I am listing the workaround here, but Adobe is also working at according tech notes (etc.).
Because the cause for the problems is excessive refreshing of the appearances, this should be suppressed during the execution of the code. There has always been a method to suppress the appearance refresh: the
delay
property.
It got introduced on field level with the very first Acrobat JavaScript version (that was 3.02 or so), and it again got introduced at document level with Acrobat 4.
By setting this property to true, any refresh of appearances get suppressed, and when it is set to false, everything gets refreshed in one single rush. So, before extensive calculations are called, you set this property to true, and after the calculations have been passed, you set it to false. For a step-by-step procedure, see at the end of this message.
In the above mentioned form, that action is now back to about 5 seconds in Acrobat 6. And it also had its effect in 5, where the action now happens almost instantaneously.
From what it seems, there are no negative effects, so that this workaround can be used routinely. The only thing which must be taken into consideration is that there is no "nesting", which means that if this is done as the first/last step in functions, and such functions are called from within other functions, the property can be set to false prematurely. It is therefore best to control it via the triggers (scripts in the MouseUp actions of buttons, for example.
Hope, this can be helpful.
Max Wyss PRODOK Engineering Low Paper workflows, Smart documents, PDF forms CH-8906 Bonstetten, Switzerland
Fax: +41 1 700 20 37 or +1 815 425 6566 e-mail: mailto:[EMAIL PROTECTED] http://www.prodok.com
[ Building Bridges for Information ]
______________________
Shameless Plug:
My next conference appearances and workshops:
• Conference presentations at the 2004 Symposium of the BFMA, May 23 to 27 in Reno, Nevada (http://www.bfma.org) and pre-/post-conference workshop, May 22/23 and 27, organized by essociates Group (http://www.essociatesgroup.com/AdvancedAcrobatForms.htm)
• And, as always, available for on-site workshops/tutorials/consulting.
_________________________
How to suppress excessive refreshing of Appearances during JavaScript code execution.
In the active element triggering the execution of the code (such as in the MouseUp event of a Button field, but also in the Calculate event of a result field), insert before the code (for example a function call):
this.delay = true ;
and after the code:
this.delay = false ;
And that should do it.
Example:
this.delay = true ;
doMyCalculations() ;
this.delay = false ;
To change your subscription: http://www.pdfzone.com/discussions/lists-pdfforms.html
