Feature #2497

Option to pre-allocate each download file

Added by drbits over 2 years ago. Updated over 2 years ago.

Status:New Start date:10/04/2010
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Controlling
Target version:JDownloader - FarfarAway
Resolution:

Description

Because of the fragmentation problems caused by incremental allocation, pre-allocation of each file when it starts to download can often speed a system.

However, this should be optional. The importance of this feature is questionable when downloading parts of an archive, because it is assumed that the archive files will be removed and replaced by the archive contents (those should be preallocated). In addition, this would prevent using file size for error recovery.


Related issues

related to Bug #3748: Save to storage medium method: amend New 09/14/2011

History

Updated by drbits over 2 years ago

Preallocation of files can be done by writing a known test string to a specific position in the file.
0XFEEF is sometimes used.

When writing the buffer to the disk, but not completing the download, writing an end of file code such as ZZYZX will help in eventually being able to find the actual end of file. This even works for multi-chunk downloads.

Finally, with modern hard drives and larger amounts of memory, setting the maximum buffer size to 32MB would not be unreasonable.

Also available in: Atom PDF