This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C6F459.ACA68A20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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.
------=_NextPart_000_0008_01C6F459.ACA68A20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.5700.6" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi guys..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I've got a function that copies one =
file to another=20
location. The file it copies is currently about 36mb. I've got an event =
being=20
fired after after every 32k buffer read from FileStream.Read(), =
containing the=20
bytes read thus far and the total bytes to read.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>When I don't invoke to update the UI =
status, the=20
copy currently completes in just under 3 seconds. With a UI status =
invoke, it=20
takes 23 seconds.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Essentially this is my event =
handler:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT color=3D#0000ff size=3D2>
<P><FONT face=3D"Courier New">if</FONT></FONT><FONT face=3D"Courier =
New"><FONT=20
size=3D2> (</FONT><FONT color=3D#0000ff size=3D2>this</FONT></FONT><FONT =
size=3D2><FONT=20
face=3D"Courier New">.InvokeRequired)<BR></FONT><FONT=20
face=3D"Courier New">{<BR> </FONT></FONT><FONT=20
face=3D"Courier New"><FONT color=3D#0000ff size=3D2>this</FONT><FONT=20
size=3D2>.Invoke(</FONT><FONT color=3D#0000ff size=3D2>new</FONT><FONT =
size=3D2>=20
</FONT><FONT color=3D#008080 =
size=3D2>ProgressRaiseDelegate</FONT></FONT><FONT=20
size=3D2><FONT face=3D"Courier New">(progEvent), e);<BR></FONT><FONT=20
face=3D"Courier New">}</FONT></FONT></P>
<P><FONT size=3D2><FONT face=3DArial>And progEvent simply involves =
setting a=20
progress bars value to the current value. Is there a way this can be=20
significantly sped up? Cheers.</FONT></P></FONT></DIV></BODY></HTML>
------=_NextPart_000_0008_01C6F459.ACA68A20--