Skip to content

Consider caching when parsing #814

@anthony-swirldslabs

Description

@anthony-swirldslabs

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions