Dexterity has a built-in script cache to cache procedures, functions, form-level procedures and form-level functions. By default, 50 scripts are cached. Use the ScriptCacheEntries defaults file setting to change the number of scripts cached.
Typically, the script cache has about a 97% hit rate. Use the Script Profiler to gauge how well the script cache is performing. The cache information is located at the end of the script profile.
For most applications, the default script cache will be adequate. However, if your application performs operations that use a combination of more than 50 procedures and user-defined functions, you may want to increase the size of the script cache. If the cache hit rate is lower than average, increasing the script cache size could improve performance.
Keep in mind that setting the cache size larger will require more memory. At a minimum, Dexterity will cache 35 scripts. If Dexterity is running out of memory and can’t perform actions such as opening forms, the script cache will automatically be flushed to make more memory available.
Opening several tables in a procedure or function can affect application performance. The first table a procedure or function opens takes the most time to open. Subsequent tables opened by the procedure or function take less time to open.
If a procedure or function opens a table buffer, then calls another procedure that uses the same table, pass the table buffer (as an inout parameter) to the second procedure, rather than having the second procedure reopen the table. It takes much less time to pass a table buffer as a parameter than to open a table.