Eliminate inefficiency in form of some extra data downloaded in sync for large files

Aperta
#380 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
performance

Direzione di ricerca

No files or tests are named in the payload. Start by locating the Synchronizer class and the downloader it drives in the b2-sdk-python codebase, then trace where a sync download sets the Range header for the first part. The linked B2 integration checklist explains multithreaded downloads. Done means the sync downloader receives the file size and opens the first part with an exact range, avoiding the extra bytes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

help wanted

Large files are downloaded in parts in parallel by all compliant clients, as specified by B2 integration checklist.

The extra data cost is there because when we start streaming the file, we don't (usually) know the size, so we are not requesting an exact range for the download of the first part, but we are sort of requesting the entire file. As soon as the headers come we realize that it's actually a big file, so we start a download session for the further parts of the file. When the data stream for the first part will emit enough data for us to satisfy the first part of the download range, we close the socket HOWEVER because there is some latency on the network, the server has already managed to send us some extra data which is being transmitted from the server to the client while the connection close request is transmitted from the client to the server. These few extra KB are lost.

When in context of sync we do know the file size. Synchronizer could communicate the file size to a specialized implementation of downloader which would then set a clean download part size using the Range header even for the first part.

Lingua principale
Python
Stelle
214
Fork
68
Merge medio
51m
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Backblaze/b2-sdk-python

Tutte le issue di Backblaze/b2-sdk-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.