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

Use orjson to improve JSON marshalling performance #691

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

@amotl amotl changed the title Start using orjson to improve JSON marshalling performance Use orjson to improve JSON marshalling performance Jan 15, 2025
@amotl amotl requested review from seut and kneth January 15, 2025 23:08
@amotl amotl force-pushed the orjson branch 4 times, most recently from 2a43b26 to c92e27b Compare January 15, 2025 23:19
@amotl amotl marked this pull request as ready for review January 15, 2025 23:27
tests/client/test_http.py Outdated Show resolved Hide resolved
tests/client/test_http.py Outdated Show resolved Hide resolved
Copy link
Member Author

@amotl amotl left a comment

Choose a reason for hiding this comment

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

Hi again. Thanks for the quick review. I've just added a few thoughts about the consequences of removing the traditional CrateJsonEncoder.

src/crate/client/http.py Outdated Show resolved Hide resolved
src/crate/client/http.py Outdated Show resolved Hide resolved
src/crate/client/http.py Outdated Show resolved Hide resolved
@amotl amotl force-pushed the orjson branch 3 times, most recently from 5b8b18c to 402cdde Compare January 16, 2025 12:51
tests/client/test_http.py Outdated Show resolved Hide resolved
@amotl amotl requested a review from seut January 16, 2025 12:57
Copy link

@kneth kneth left a comment

Choose a reason for hiding this comment

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

Great to see this performance fix. Thanks to @amotl and @seut!

Copy link
Member

@seut seut left a comment

Choose a reason for hiding this comment

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

looks good

src/crate/client/http.py Outdated Show resolved Hide resolved
@surister
Copy link

Do we have a benchmark?

src/crate/client/http.py Outdated Show resolved Hide resolved
@amotl
Copy link
Member Author

amotl commented Jan 16, 2025

Do we have a benchmark?

It's not a benchmark, but @widmogrod shared a flamegraph before/after over at #689 (comment).

src/crate/client/http.py Outdated Show resolved Hide resolved
CHANGES.rst Outdated Show resolved Hide resolved
src/crate/client/http.py Fixed Show fixed Hide fixed
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.

4 participants