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

Go directly to rasterio.DatasetReader instead of rasterio.open #1008

Merged
merged 1 commit into from Sep 3, 2020

Conversation

Kirill888
Copy link
Member

rasterio.open tries to be smart about environment setup even if user didn't
activate environment, it also deals with ro vs rw modes. Since we always open in
ro mode and always activate credentialed environment we can skip directly to
DatasetReader class and avoid credentialization bugs in rasterio.

Reason for this pull request

major slow-down in sandbox are caused by rasterio misguided attempts at credentialization on every file open even when public reads are enabled.

GeoscienceAustralia/dea-sandbox#121

  • Closes #xxxx
  • Tests added / passed
  • Fully documented, including docs/about/whats_new.rst for all changes

`rasterio.open` tries to be smart about environment setup even if user didn't
activate environment, it also deals with ro vs rw modes. Since we always open in
ro mode and always activate credentialed environment we can skip directly to
DatasetReader class and avoid credentialization bugs in rasterio.
@Kirill888 Kirill888 requested a review from omad September 2, 2020 00:52
@codecov
Copy link

codecov bot commented Sep 2, 2020

Codecov Report

Merging #1008 into develop will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1008   +/-   ##
========================================
  Coverage    93.02%   93.02%           
========================================
  Files           96       96           
  Lines         9792     9793    +1     
========================================
+ Hits          9109     9110    +1     
  Misses         683      683           
Impacted Files Coverage Δ
datacube/storage/_rio.py 94.04% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 220c020...51c4fc0. Read the comment docs.

Copy link
Member

@omad omad left a comment

Choose a reason for hiding this comment

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

Sounds good to me!

@omad omad merged commit abd35d9 into develop Sep 3, 2020
@delete-merged-branch delete-merged-branch bot deleted the rio-workaround branch September 3, 2020 01:21
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.

None yet

2 participants