qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

High priority file slows when close to 100%

Open under3415 opened this issue 3 years ago • 2 comments

qBittorrent & operating system versions

qBittorrent: 4.3.8 x64 Operating system: Windows 10 Pro 21H1 19043.1266 64bit Qt: 5.15.2 libtorrent-rasterbar: 1.2.11

What is the problem?

When downloading multiple files, I often set the first file to maximum priority so that I have the file available asap while others are still downloading.

This works well untill the high priority file is near 100%. It then slows down and other files are being downloaded while the first file is standing still at 99.x%

Steps to reproduce

  1. Download magnet with multiple large files
  2. Set one to max priority
  3. Watch it stall at 99.x%

Additional context

No response

Log(s) & preferences file(s)

No response

under3415 avatar Oct 12 '21 01:10 under3415

Unless files are aligned at the piece boundary, which is very rarely the case, there will be a piece that is shared between the end of a file and the beginning of the next file. This piece must be downloaded for the file to complete.

FranciscoPombal avatar Oct 16 '21 17:10 FranciscoPombal

Maybe that piece needs to be prioritized as well? There is little point in prioritizing 99.6% of the file and then having to wait for the final 0.4%...

Although, there seems to be more to it. It's almost like that final piece is treated like the lowest priority. What I observed is that last piece is not downloaded until all the other files are downloaded at the very end. It's like that last piece is held hostage :-)

under3415 avatar Oct 16 '21 21:10 under3415