hashgraph / hashgraph/pbj

Revisit String performance

Open
#620 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
44
Forks
15
Avg merge
1d 15h
Merged PRs (30d)
12

Description

UTF-8 encoding takes time. Many times, we don't even use strings that we parse (e.g. memo fields and similar). So PBJ may be wasting time encoding them when parsing objects.

The idea is to store strings as original `byte[]` objects in models and only perform the encoding if/when someone calls a getter on the model for the string. If the getter is never called, then we never need to waste cycles on the encoding.

A PoC of this change is available at https://github.com/hashgraph/pbj/pull/612

The task is to extract it, get it to the production level, and release the change.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.