Speed Optimization

a) Application optimization

At first, variable definitions which are to be constant during printing, can be pulled out of the print loop. If you want to always print your company name in the letter head with lists, it's best to define it outside the loop before LlPrintWithBoxStart().

b) Is the variable / field used?

You can also query which variables or fields are used in the expressions. If the number of potential variables or fields is much bigger than the actually used number or getting the data values is complex (sub queries, calculations, etc.) using these functions is worth it. Calling LlGetUsedIdentifiers() returns all variables and fields used in the project. LlGetUsedIdentifiersEx() furthermore allows to differentiate between the type (variable or field).

You should call this function before print start and later only pass the fields or variables from your data source which will actually be used.

c) Global "Dummy"-job

Some of the system libraries (e.g. riched20.dll) used by List & Label seem to cause resource losses under certain circumstances. These are very small but incur with every load and unload of the DLL.

These DLLs are loaded or unloaded by List & Label with every open or close of the "first" job. Therefore you should avoid a frequent LlJobOpen() / LlJobClose() in your application or to start a dummy job at start and keep it open until the end. The permanent loading and unloading of the DLLs is avoided and besides the achieved speed optimization also the resource losses won't occur anymore.