There are two ways to access data from an Item. The obvious way is by calling methods on the Item class such as Item.getValues, but methods are also available on the Document class such as Document.getItemValue. These convenience methods are a shortcut if the Item object is not already in hand. When Document class methods are called, backend internals create an intermediate item object to accomplish the data fetch.
In 8.53, in response to Out Of Memory reports from customer installations, we have made internal changes to the way backend does memory management in methods related to the Document.getItemValue method and its derivatives, getItemValueString, getItemValueInteger, getItemValueDouble, as well as the extended property syntax in LotusScript. An example of this would be
where myItem is the name of an Item within doc.
In releases prior to 8.53, when the shortcut methods to access Item data directly from a Document were used, an internal Item object was generated to access the value. Anticipating that the user might later access the Item, the intermediate Items were retained until the Document was destroyed. For the majority of users, this was not a problem, as Documents regularly are recycled or go out of scope, and the number of data accesses were generally not too many.
As the web gains importance, causing data access to simultaneously occur on many webserver worker threads, more conservative memory management techniques are needed. From 8.53 going forward, the internal Items will not be retained, and their memory is recovered as soon as the Item value is retrieved from a Document.
These changes affect both LotusScript and Java applications. Most will not notice the changes, as runtime behavior is identical to previous releases. Others that access many Items and keep many Documents in scope will have more available memory available to them. Note that if you intend to do additional Item calls after data access, it is now more efficient to do a Document.findFirstItem call to get the Item, then retrieve the values by direct calls to methods on the Item class. This is to prevent creating the Item itself multiple times as would be the case with multiple calls to the Document class.
For any applications running on pre-8.53 releases, if memory in this area becomes a problem, a good workaround is to avoid the Document class shortcut methods and instead use the Item class methods such as Item.getValues.