1.6

Table Of Contents
Script timeout
When testing scripts, either by toggling to Preview mode or by using the Script Profiler, a script
timeout is active in the Designer, so that scripts that need a very long time to run are stopped
after a set time. You can adapt this timeout to your needs, as follows:
1.
On the menu, select Window > Preferences.
2.
Click Scripting.
3. Set a timeout in seconds (for example: 2s) and click OK. The minimum timeout is 1
second.
Note
The script timeout is not active when generating output.
Optimizing scripts
In the process of output generation, the execution of scripts may take up more time than
necessary. To optimize a template, it helps to disable scripts that don't have an effect on the
output; see "Managing scripts" on page532.
This topic presents a number of other ways to speed up script execution by optimizing the
scripts.
Use an ID as selector
Scripts (except control scripts) start with a query. The selector in the second column in the
Scripts pane is what a script looks for in the template. If you've used the drag-and-drop method
(without pressing the Alt or Ctrl key) to insert a data field in a template, the selector is a small
text: the name of the data field surrounded by @ signs, @firstname@ for example.
Looking for text in a text is a less optimized operation and may impact output speeds in longer
documents. To speed up the output process, point the script to the element that contains the
placeholder, by using its ID as selector. This narrows the scope of the search and results in a
very fast query, as elements with an ID are indexed by Connect Designer's layout engine.
To learn how to put a placeholder or placeholders inside an element that has an ID, see
"Boxes" on page432. To use that ID as the script's selector: double-click the script in the
Page 539