You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By doing that, when resources already linked are loaded from storage, no memory needs to be allocated for the proxyInformation list and the resolving set.
The text was updated successfully, but these errors were encountered:
that is true, the internal array is not allocated. However, the ArrayList object itself has to be allocated. It is not to be a massive win, but it the object allocation can be saved, it will be slightly better. Our application is a multi-threaded application that deals with many resources loaded on demand and short-lived. Since the code of PR #3318 which is not complex, I think it is worth the effort.
Also note, that even though new ArrayList is not allocating a new array, the current implementation of LazyLinkingResource.clearLazyProxyInformation() is allocating a list with an new allocated internal array if the proxyInformation had entries before. This last point can be fixed by just calling clear on the existing list, which is also part of the proposed PR.
By doing that, when resources already linked are loaded from storage, no memory needs to be allocated for the
proxyInformation
list and theresolving
set.The text was updated successfully, but these errors were encountered: