Will memory usage change between field level and document level?
Does writing all the code in each field, or writing a document-level function and writing it, change the overall processing speed of the document?
Does (1) and (2) below change the overall document processing speed? For example, suppose there are about 20 fields that use the same calculation. And suppose it's a bit longer code.
(1) Write the same code in all fields.
(2) Write a document level function and use it.
Obviously, (2) is the safest and easiest way to write code.
Is there any difference between (1) and (2) above? Of particular interest is how PDF JavaScript uses memory. I've heard that generally global functions use a lot of memory, so it's better not to use too much.
