Skip to content

Inject a singleton Gson instead of creating it many times - #3058

Merged
gbrodman merged 1 commit into
google:masterfrom
gbrodman:singletonGson
May 22, 2026
Merged

Inject a singleton Gson instead of creating it many times#3058
gbrodman merged 1 commit into
google:masterfrom
gbrodman:singletonGson

Conversation

@gbrodman

@gbrodman gbrodman commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Creation of Gson objects is nontrivial and it's thread-safe so we might as well just use some singleton objects as much as possible rather than recreating them.


This change is Reviewable

@gbrodman
gbrodman requested a review from weiminyu May 21, 2026 18:35
Creation of Gson objects is nontrivial and it's thread-safe so we might
as well just use some singleton objects as much as possible rather than
recreating them.

@weiminyu weiminyu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiminyu reviewed 7 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on gbrodman).

@gbrodman
gbrodman added this pull request to the merge queue May 22, 2026
Merged via the queue into google:master with commit b3fc57c May 22, 2026
15 checks passed
@gbrodman
gbrodman deleted the singletonGson branch May 22, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants