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

chunk transfer #95

Merged
merged 8 commits into from
Dec 3, 2020
Merged

chunk transfer #95

merged 8 commits into from
Dec 3, 2020

Conversation

geospatial-jeff
Copy link
Owner

@geospatial-jeff geospatial-jeff commented Dec 1, 2020

Implements chunk transfer encoding. This was already enabled through the Filesystem.read() method, so this mostly involved improving the efficiency of tag reading. I did have to remove parallel tag reading (#92) since the tags are not aware of each other and would send the same 16kb request multiple times, but overall this makes things faster.

To make things simpler for now, we coerce the chunk size to be at least the minimum size required to accomplish the operation that initiated the request (ex. chunk size is 10k but reading a tag value requires 15k bytes). This also makes it possible to test the differences between chunk sizes, as setting a chunk size of 0 will essentially disable chunking for all header requests. This could be an issue on larger images with really big offset tags, but aiocogeo doesn't support BigTiff yet anyways!

Closes #76

TODOs:

  • differentiate between INGESTED_BYTES_AT_OPEN and the chunk size used to request data beyond the initial request. And make them both configurable.

@codecov-io
Copy link

codecov-io commented Dec 1, 2020

Codecov Report

Merging #95 (16a750f) into master (e5b7b48) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
+ Coverage   93.23%   93.25%   +0.01%     
==========================================
  Files          12       12              
  Lines        1079     1082       +3     
==========================================
+ Hits         1006     1009       +3     
  Misses         73       73              
Impacted Files Coverage Δ
aiocogeo/cog.py 93.87% <100.00%> (+0.02%) ⬆️
aiocogeo/config.py 100.00% <100.00%> (ø)
aiocogeo/filesystems.py 83.25% <100.00%> (+0.07%) ⬆️
aiocogeo/ifd.py 96.68% <100.00%> (ø)
aiocogeo/tag.py 100.00% <100.00%> (ø)

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 e5b7b48...16a750f. Read the comment docs.

@geospatial-jeff geospatial-jeff merged commit 950ea55 into master Dec 3, 2020
@geospatial-jeff geospatial-jeff deleted the chunk-transfer branch December 3, 2020 01:42
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.

investigate chunk transfer encoding
2 participants