On Tue, 11 Jul 2023 20:28:29 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> I think VMObjectFactory is a better place to implement the caching behavior >> so that all such patterns can benefit from it. I think it is better >> addressed in another task. > > I think maybe you misunderstood what I meant by "cache". I'm not talking > about a hashmap of weak references or anything like that. Just add a > `ArrayOfU1Array annotationsArray` field to the Annotations object and store > the result there. Got it. Updated the code as suggested. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14735#discussion_r1261593029