5.5. Performance

The AQL functions are designed for convenience, not speed. The functions in the DLL do include some local caching to reduce the amount of file access when a single model is being used. However, as they comply with the general Windows recommendation for not keeping files open between calls (which also means that they do not require initialization or close down and should not cause system problems if the Aqwa files are updated while Excel is running), they do perform a lot of input from the Aqwa file system to retrieve even small amounts of data.

Excel does have an unpleasant habit of performing a full recalculation when not necessary (especially when a row or column is inserted or deleted, or after moves or copies). If a worksheet has a table containing thousands of numbers retrieved by AQL, this can take some time. One way of avoiding the recalculation is to create the table using AQL functions and then replace the formulae with the results so the cells contain only numbers thereafter - which require no recalculation. To do this, select the main body of the table, then the copy command (Edit | Copy on the menu). Immediately after this give the paste special command specifying values only (Edit | Paste Special | Values | OK on the menu). It's a good idea to save a single copy of the original formula somewhere in case the table has to be reconstructed.