Skip to content

feat: retrieve sftp file attrs onces instead multiple time - #44625

Merged
potiuk merged 1 commit into
apache:mainfrom
dondaum:feat/faster-sftp-list-dir
Dec 6, 2024
Merged

feat: retrieve sftp file attrs onces instead multiple time#44625
potiuk merged 1 commit into
apache:mainfrom
dondaum:feat/faster-sftp-list-dir

Conversation

@dondaum

@dondaum dondaum commented Dec 3, 2024

Copy link
Copy Markdown
Contributor

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.

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

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

potiuk commented Dec 6, 2024

Copy link
Copy Markdown
Member

Intermittent error - not related. Merging.

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