There's a use-case for small same objects being parsed many times. For example, AccountID objects for accounts receiving fees are the same, and they participate in almost every transaction.
Currently, PBJ creates a new instance of such small objects every time it parses one. This increases the pressure on GC as it has to free those objects.
The idea is to cache frequently used objects and return a cached instance instead of creating a new object each time.
There's a use-case for small same objects being parsed many times. For example, AccountID objects for accounts receiving fees are the same, and they participate in almost every transaction.
Currently, PBJ creates a new instance of such small objects every time it parses one. This increases the pressure on GC as it has to free those objects.
The idea is to cache frequently used objects and return a cached instance instead of creating a new object each time.