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: retrieve sftp file attrs onces instead multiple time #44625

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

dondaum
Copy link
Contributor

@dondaum dondaum commented Dec 3, 2024

Adding a new method for the SFTPHook to retrieve all files including their sftp attributes.

Currently, when listing files, all files are retrieved first and then another request is sent for each file to retrieve the file attributes. Listing many files slows down this behavior.

I tested the performance with 500 files and it dropped from about 49 seconds to 1-2 seconds.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Very Cool! Thanks for also doing performance checks!

@potiuk
Copy link
Member

potiuk commented Dec 6, 2024

Intermittent error - not related. Merging.

@potiuk potiuk merged commit e625e7f into apache:main Dec 6, 2024
66 of 67 checks passed
Ohashiro pushed a commit to Ohashiro/airflow that referenced this pull request Dec 6, 2024
LefterisXefteris pushed a commit to LefterisXefteris/airflow that referenced this pull request Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants