Downloader icon indicating copy to clipboard operation
Downloader copied to clipboard

Large files downloading issue #2

Open Dolus1984 opened this issue 7 years ago • 4 comments

There is still issue correlated with large files. This time when numberOfParts is bigger than 1 (try 4+) it take some time when file is created on hard drive. Every second i can see progress of it looking on file size. With 10GB file and SSD array it take around two minutes, then everything stuck. I do not know if it is possible to create empty ghost file for speed up this process? At this step if you restart downloading/app and keep same file name it appear like downloading start fine.

Dolus1984 avatar May 02 '17 19:05 Dolus1984

i guess currently i am having same issue with this.

abhay991 avatar Apr 06 '18 02:04 abhay991

I'm working on the big file download using this program, but the big file download cardon problem is really a headache.

pgd19900 avatar Jun 02 '18 09:06 pgd19900

Hi, Can you provide email contact.

pgd19900 avatar Jun 02 '18 09:06 pgd19900

@pgd19900 I don't know what you mean by "cardon" / "caton", please explain with an example. If your question for email contact is if I provide free support for this software, the answer is no.

I haven't investigated this problem in depth, but to me it looks like that when a download of a huge file is created and the first part is written near the end of the file, this causes the Windows I/O system to allocate memory for the complete file, which takes some time.

So you may try creating the file in a more efficient way before the download starts (see https://stackoverflow.com/questions/1881050/creating-a-huge-dummy-file-in-a-matter-of-seconds-in-c-sharp for example), but I don't think this will stop the freeze alltogether.

If you really want a freeze-free solution, in my opinion you have to write your own DownloadToFileSaver that creates the full file on startup, but doesn't block on that. While the full file is created, it needs to temporarily save the already downloaded parts to some other storage/file and keep track of that. Then when the full file is completely created, the Saver needs to store the already downloaded parts and the correct position in the full file and from then on writes newly downloaded chunks directly to the fulll file.

Toqe avatar Jun 02 '18 11:06 Toqe