cpu usage too high (>50%) when uploading file using httpwebrequest
<p>I am using Httpwebrequest to upload file to server (smugmug/ skydrive api). When I try to upload a big file say 300 MB CPU usage is very high for the application, its around 50% . How can i reduce it. I am uploading file in chunks (allowstreambuffering = false) using httpWebRequest.</p>

<pre><code>            requestStream = request.GetRequestStream();
            request.BeginGetResponse(OnProcessComplete, request);
            int start = 0;
            int chunkSize = 1024 * 100;

            try
            {
            while (start &lt;= length)
            {
            if (start + chunkSize &gt; length)
            requestStream.Write(image, start, length-start);
            else
            requestStream.Write(image, start,chunkSize);
            start += chunkSize;
            double percentage = ((start) / (length * 1.0) ) * 100 ;
            Console.WriteLine("uploading: " + percentage.ToString() + "%");
            }
            }
            catch (Exception ex)
            {
            Console.WriteLine(ex.ToString());
            }

            response = (HttpWebResponse)request.GetResponse();
            reader = new StreamReader(response.GetResponseStream());
            string strResult = reader.ReadToEnd().ToUpper();
</code></pre>

<p>Can someone help me on this.
thanks.</p>
