>>>I think Rob's point was that increasing the buffer size from 4Kb to 256kb would mean your loop count is reduced by a factor of 64.
>>>But is it the loStream.Write() or the loProgressBar.ShowProgress() which is taking the time.....
>>
>>At 90% of the increase performance gain, it targets at the buffer. There might be some improvements to look at the other two points mentioned. But, for now, I have an amazing upload performance gain and this is good enough for a while so I can concentrate on other things.
>
>
>What is the performance if you
>
>(1) Increase the buffer size to 16384
>(2) update the progressbar every mulitple of 16 times in the loop
>
>
>Reason: 16k or 256 k won't make much of a difference - my ( and others ) guess is that it is the updating of the progress bar that eats cpu cycles
In addition - after the above, since this is rrunnig as a sequential process, my guess is that you may have another performanc increase, if you ran the reading and the writing asynchronously, so that you can start the next read of 16k while writing the previous 16k
Gregory