BITSDownloader poor performance

Topics: Updater Application Block
Feb 24, 2005 at 7:32 AM
originally posted by: JimmyDotNet

I'm testing UAB with an update of about 1000 files. When the UAB begins the download process it calls the following method on BitsDownloader class:

private void PrepareJob( IBackgroundCopyJob backgroundCopyJob, UpdaterTask task)

The method cycles through the list of files and prepares the required temporary files and folders but it takes about 40 minutes to complete.

Are there any way to improve the performance for this process?
Feb 24, 2005 at 12:11 PM
originally posted by: figuerres2

in general BITS is not supposed to be really fast....
that many files means a whole bunch of http trasfers for processing.

are the files large? small? mixed?

would it create a problem to take them and zip them?

there are free zip libs for .net to use in the client do un-zip an archive.

then in place of say 1,000 file downloads you might have 5 .zip files with 200 files in one zip.

thats one way to help it .... would that work for your app??

another way is to forget BITS and do normal HTTP that might be a bit faster.
but the 1,000 files may be the "CHoke Point" I think it has to build an array or list of files and that seems like a place where it might get hosed.
Feb 25, 2005 at 4:54 AM
originally posted by: Param23

Really the HTTP downloader method suggested by figuerres2 is excellent and very fast.

You can try with the same.


Feb 25, 2005 at 5:34 AM
originally posted by: figuerres2

Just remember that 1,000 HTTP transactions (request, send,ack) is a big overhead so if you can zip up the files in some batches to ballance the size of each download Vs. the total number of downloads.....

raw HTTP or BITS will both benefit from reducing the number of times you hit the server.

the only real issue is that if you made one huge file then you would be wating a while to know if it was a good download...

but with a number of files you have a better way to keep showing the user some progress and the like....
Mar 1, 2005 at 6:35 AM
originally posted by: JimmyDotNet

I've analyzed the problem. The BITS Downloader has a poor performance only when it prepares for download. I have about 1000 small files on the server but file downloading is fast.

I'm not using compression but hash comparison method was very useful in this scenario. Only the initial download suffers poor performance but small updates are very efficient.