2019.1

Table Of Contents
Scripts
In the process of output generation, the execution of scripts may take up more time than
necessary. Here's what you can do to shorten that time.
l
Use efficient selectors. Using very precise selectors in scripts will be much faster than
using a text selector, especially on large documents. See "Use an ID as selector" on
page812.
l
Optimize your scripts. Custom scripts with non-optimized loops and unnecessary DOM
manipulations can slow down Content Creation. Use the Designer's test facilities to find
out which scripts can be improved (see "Testing scripts" on page807 and "Optimizing
scripts" on page812).
l
Only run the necessary scripts. Normally the Designer will run all scripts for each and
every record and section. You can save time in the process of Content Creation by
organizing scripts in folders and setting their execution scope or even disabling them (see
"Managing scripts" on page804). Note that loading a JavaScript library is generally very
fast and is only done once for the record set.
l
Use a fast network and internet connection or avoid loading external or internet
resources. Using images, JavaScript or CSS resources located on a slow network or on a
slow internet connection will obviously lead to a loss of speed. While we do our best for
caching, a document with 5,000 records which queries a page that takes 1 second to
return a different image each time will, naturally, slow output generation down by up to 83
minutes.
l
Make sure to use optimized graphic resources. For instance, avoid using images with
transparency where no transparency is needed.
Images
l
Make sure to use optimized graphic resources. For instance, avoid using images with
transparency where no transparency is needed.
l When a template that contains lots of images is merged with a large record set, the many
file requests may slow down the process of output generation. One solution is to combine
the images into a single image file (an 'image sprite') and display the part that holds the
image. This reduces the number of file requests and can improve the output speed
significantly.
Page 1362