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(airbyte-cdk): use orjson to speed up parsing #44829

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

artem1205
Copy link
Collaborator

What

Resolve https://github.com/airbytehq/airbyte-internal-issues/issues/9428
Reason: orjson is much faster than standard json

How

replace json with orjson for encoders/parsers

Most important/heavily used is change in JsonlDecoder https://github.com/airbytehq/airbyte/pull/44589/files#diff-404f304b08b4a327259c7999f75283e1f111edaac2bb09196cb2c536f141f2deL74-L75

Tip

The difference for the test test_jsonl_decoder_memory_usage is about 20%.

Review guide

User Impact

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

[skip CI]

Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Aug 29, 2024 8:34am

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Aug 27, 2024
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
@artem1205 artem1205 self-assigned this Aug 27, 2024
@artem1205 artem1205 changed the title Airbyte CDK: use orjson to speed up parsing feat(airbyte-cdk): use orjson to speed up parsing Aug 28, 2024
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
@artem1205 artem1205 marked this pull request as ready for review August 29, 2024 08:45
@artem1205 artem1205 requested a review from a team August 29, 2024 08:45
Copy link
Contributor

@girarda girarda 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 @artem1205

@artem1205
Copy link
Collaborator Author

artem1205 commented Aug 29, 2024

/approve-regression-tests

Check job output.

✅ Approving regression tests

@artem1205 artem1205 merged commit 7644dcd into master Aug 29, 2024
38 checks passed
@artem1205 artem1205 deleted the artem1205/airbyte-cdk-json-to-orjson branch August 29, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDK Connector Development Kit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants