Skip to content

ENH: Speed up S3DataGrabber using prefix arg #2143

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

Merged
merged 2 commits into from
Aug 4, 2017
Merged

ENH: Speed up S3DataGrabber using prefix arg #2143

merged 2 commits into from
Aug 4, 2017

Conversation

lukassnoek
Copy link
Contributor

Changes proposed in this pull request

  • When finding files on S3 (using S3DataGrabber), the command ...

    bkt_files = list(k.key for k in bkt.list())

... finds all files in a given bucket, which takes very long for the openneuro and openfmri buckets. On my computer, this command (using the example from nipype/interfaces/tests/test_io.py) takes 170 seconds. However, as proposed in my PR, when you use the prefix argument with the bucket_path in the bkt.list() call, it only takes 116 milliseconds. This is because it restricts the filesearch to only the files in the specified bucket_path. The interface still works when bucket_path is not set as input (i.e., it works with the default '' value of the bucket_path parameter).

  • Add name/affiliation to zenodo-file (first PR!)

@satra satra merged commit 3164602 into nipy:master Aug 4, 2017
@satra satra added this to the 0.14.0 milestone Oct 20, 2017
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.

2 participants