Flutter Http block HTTP download and

 

 

Block download really boost download speed it?

In fact, the main bottleneck is the download speed depends on the speed and exit speed of the network server, if it is the same data source, meaning the block download is not large, because the server is the same, the exit velocity determined, depending on network speed, the example above official homologous block download, readers can compare their own download speed regardless of the block and the block. If there are multiple download sources, and download the export bandwidth of each source is limited, then the block may be faster to download it, say "may" is due this is not certain, for example, there are three sources output bandwidth are three sources of 1G / s, while the peak of the connected network devices assume that we only 800M / s, then the bottleneck is in our network. Even if the bandwidth is greater than any of our source device, download speed is still not necessarily faster than single-source-line download, Imagine, assuming there are two sources A and B, the source is three times the speed A source of B, if the block downloads , two sources each half, then download, readers can count download time, and then count only the time needed to download from a source to see which is faster.

Block final speed download device is located by the network bandwidth, source outlet velocity, for each block size, and number of sub-blocks by many factors, the actual process is difficult to ensure the optimal speed. In the actual development, the reader can test and then decide whether to use contrast.

Block download what practical use it?

Block download Another scenario is compared using the HTTP, the file may be divided into a number of blocks, and maintains a status of the download file for recording a state of each block, so that even after a network outage, can be restored interrupt status before the specific implementation readers can try it yourself, there are some details that need special attention, such as block size the number of suitable? How to download half a block to deal with? Do you want to maintain a task queue?

Guess you like

Origin www.cnblogs.com/sea-stream/p/12333360.html