Opened 19 years ago

Last modified 19 years ago

#1486 closed Patch

Pre-allocate diskspace to minimize fragmentation

Reported by: soepy Owned by:
Priority: normal Component: FileZilla Client
Keywords: Cc: soepy, Tim Kosse
Component version: Operating system type:
Operating system version:

Description

This patch pre-allocates exactly the needed amount of
diskspace when getting a file. This will minimize
fragmentation, especially when transferring more than 1
file at once.
The Filezilla Server already contains code similar to
the code in this patch, so only the client is affected.

I've added SetLength64 to MFC64bitfix and call it after
opening the file. I truncate the filesize in
ResetOperation in case something went wrong.

Sorry, no diff.

Attachments (1)

preallocat_diskspace.zip (30.5 KB ) - added by soepy 19 years ago.
New source files (sorry, no diff)

Download all attachments as: .zip

Change History (3)

by soepy, 19 years ago

Attachment: preallocat_diskspace.zip added

New source files (sorry, no diff)

comment:1 by Tim Kosse, 19 years ago

Sorry but I can't apply the patch in it's current form. It
doesn't check whether remote filesize is known in advance.
Also it tries to truncate files just open for reading.

Sidenode: Preferred patch format is a unified context diff
against CVS HEAD as generated by 'cvs diff -u'

comment:2 by soepy, 19 years ago

I just got pserver working (problem with my ISP) and will
get you a real diff once I've checked the problems you've
described..

Note: See TracTickets for help on using tickets.