The form objects can be large data structures with long answer lists and texts. Every call of the f function will result in a new instance being retrieved. If the question has a code or scale mask, this mask will be evaluated for every call on the f function for this question. It is recommended to try to reduce the number of calls on the f function, for example by not always applying methods and properties directly on the function as we have been doing in all our examples so far. If you will be calling the f function on the same question ID several times in a script (especially if you call the f function inside a for or while loop), the best approach is to call it once and store the object instance in a variable instead:
variableName = f(qID,{loopiter1,loopiter2,...,loopitern});Usually the difference is not significant, but it is recommended because it will reduce the execution time of your scripts. The interview pages will then load faster reducing the risk of irritating respondents and reducing server performance.