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

feat: replace default jsonify with an orjson powered jsonify #564

Closed
wants to merge 3 commits into from

Conversation

sansyrox
Copy link
Member

Robyn exposes a function named jsonify, which used the default json library. This commit replaces it with the faster orjson library.

Description

This PR fixes #525

Robyn exposes a function named `jsonify`, which used the default json library. This commit replaces it with the faster `orjson` library.
@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for robyn canceled.

Name Link
🔨 Latest commit 1bcf6d7
🔍 Latest deploy log https://app.netlify.com/sites/robyn/deploys/64bbf5ddc3bee400083805c5

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 22, 2023

CodSpeed Performance Report

Merging #564 will degrade performances by 20.77%

⚠️ No base runs were found

Falling back to comparing feat/orjsonify (1bcf6d7) with main (158d6fc)

🎉 Hooray! pytest-codspeed just leveled up to 2.0.1!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

❌ 2 regressions
✅ 90 untouched benchmarks

🆕 8 new benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main feat/orjsonify Change
test_add_request_header 783.5 µs 896 µs -12.56%
🆕 test_valid_authentication[sync] N/A 34.9 ms N/A
🆕 test_valid_authentication[async] N/A 31.6 ms N/A
🆕 test_invalid_authentication_token[sync] N/A 31.1 ms N/A
🆕 test_invalid_authentication_token[async] N/A 31.1 ms N/A
🆕 test_invalid_authentication_header[sync] N/A 31.1 ms N/A
🆕 test_invalid_authentication_header[async] N/A 31.1 ms N/A
🆕 test_invalid_authentication_no_token[sync] N/A 31 ms N/A
🆕 test_invalid_authentication_no_token[async] N/A 31 ms N/A
test_basic_get[/sync/dict-sync dict get-sync-dict] 31.7 ms 40 ms -20.77%

@sansyrox
Copy link
Member Author

Screen Shot 2023-07-22 at 17 12 49 Surprisingly orjson causes a regression

@sansyrox sansyrox closed this Jul 30, 2023
@sansyrox sansyrox deleted the feat/orjsonify branch July 30, 2023 13:06
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.

Jsonify from rust
1 participant