Skip to content

Provide an option to use orjson instead of json #562

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yuokada
Copy link
Contributor

@yuokada yuokada commented May 29, 2025

Description

orjson is a fast JSON library in Python.
https://github.com/ijl/orjson?tab=readme-ov-file#performance

In my usage, json.loads() is one of the bottlenecks in performance when fetching a large result from a query.

Non-technical explanation

  • Provide an option to use orjson instead of json for faster query result fetching.

Release notes

( ) This is not user-visible or docs only and no release notes are required.
(X) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label May 29, 2025
Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

why? please provide some explanation what the change is about.

@yuokada
Copy link
Contributor Author

yuokada commented May 29, 2025

The purpose to use orjson is mainly to fasten the process of fetching query results from Trino servers.
https://github.com/ijl/orjson

This PR is still a draft. I have to fix the CI failures. I'm going to write the description before making this PR ready for review.

@yuokada yuokada marked this pull request as ready for review May 29, 2025 10:11
@hashhar
Copy link
Member

hashhar commented Jun 2, 2025

thanks, it would also be helpful to see some measurements with and without this change to get an idea of the impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants