O
OPL
Hi guys..
I've got a function that copies one file to another location. The file it copies is currently about 36mb. I've got an event being fired after after every 32k buffer read from FileStream.Read(), containing the bytes read thus far and the total bytes to read.
When I don't invoke to update the UI status, the copy currently completes in just under 3 seconds. With a UI status invoke, it takes 23 seconds.
Essentially this is my event handler:
if (this.InvokeRequired)
{
this.Invoke(new ProgressRaiseDelegate(progEvent), e);
}
And progEvent simply involves setting a progress bars value to the current value. Is there a way this can be significantly sped up? Cheers.
I've got a function that copies one file to another location. The file it copies is currently about 36mb. I've got an event being fired after after every 32k buffer read from FileStream.Read(), containing the bytes read thus far and the total bytes to read.
When I don't invoke to update the UI status, the copy currently completes in just under 3 seconds. With a UI status invoke, it takes 23 seconds.
Essentially this is my event handler:
if (this.InvokeRequired)
{
this.Invoke(new ProgressRaiseDelegate(progEvent), e);
}
And progEvent simply involves setting a progress bars value to the current value. Is there a way this can be significantly sped up? Cheers.