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

Airbyte CDK: move deprecated decorator #44023

Merged
merged 4 commits into from
Aug 16, 2024

Conversation

artem1205
Copy link
Contributor

@artem1205 artem1205 commented Aug 14, 2024

What

Resolve https://github.com/airbytehq/airbyte-internal-issues/issues/8862

@deprecated decorator is initialized on every function call. This puts unnecessary load on the heavily used method get_updated_state in incremental syncs .

How

Move @deprecated decorator for function get_updated_state to class level.

Review guide

  1. airbyte-cdk/python/airbyte_cdk/sources/streams/core.py

Performance Impact

According to the Profiler Stats, removing them can save us about 4-5% of execution time, see https://github.com/airbytehq/airbyte-internal-issues/issues/8862#issue-2433380004

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@artem1205 artem1205 self-assigned this Aug 14, 2024
Copy link

vercel bot commented Aug 14, 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 16, 2024 10:21am

@artem1205 artem1205 marked this pull request as ready for review August 14, 2024 09:35
@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Aug 14, 2024
@artem1205 artem1205 requested a review from a team August 14, 2024 09:36
@maxi297
Copy link
Contributor

maxi297 commented Aug 14, 2024

Can we add a bit more information on the impact? How much time do we expect to save per method call? Per sync?

@maxi297
Copy link
Contributor

maxi297 commented Aug 14, 2024

Should we do that for the methods in HttpStream as well?

@artem1205
Copy link
Contributor Author

artem1205 commented Aug 14, 2024

Can we add a bit more information on the impact? How much time do we expect to save per method call? Per sync?

Update description with link to issue description. I expect about 4-5% of execution time (per sync).

Should we do that for the methods in HttpStream as well?

These methods are used only in adapters and not very frequently during the sync, so their impact will be minimal.

Copy link
Contributor

@maxi297 maxi297 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for linking the impacts in the PR

Signed-off-by: Artem Inzhyyants <[email protected]>
@artem1205
Copy link
Contributor Author

artem1205 commented Aug 16, 2024

/approve-regression-tests

Check job output.

✅ Approving regression tests

@artem1205 artem1205 merged commit 1065562 into master Aug 16, 2024
31 of 33 checks passed
@artem1205 artem1205 deleted the artem1205/airbyte-cdk-move-deprecated branch August 16, 2024 11:10
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.

4 participants