Provide an option to use orjson instead of json
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`)
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.
thanks, it would also be helpful to see some measurements with and without this change to get an idea of the impact.
Good Point !
I test on Python 3.13 with 3.96 MB JSON file in Jupyter notebook. And found that the orjson has significant improvement.
Maybe, superceded by #576