Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for performance: change JSONBCodec format to BinaryFormatCode. #1811

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

piyongcai
Copy link

just for performance. because json.Unmarshal need []byte parameter

@jackc
Copy link
Owner

jackc commented Dec 2, 2023

In general, I don't want to merge any performance optimizations without a benchmark that shows the improvement.

That's especially true in this case because the text format was chosen on purpose. PostgreSQL (at least historically) has a significant performance penalty when returning text-like types as binary. See https://github.com/jackc/pg_text_binary_bench.

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