I have a question regarding the performance of the .Net HttpWebRequest client (or WebClient, gives similar results).
If I use HttpWebRequest to request an html page
Run the application with Ctrl+F5 instead of F5 (Debug mode). You will see a difference:
class Program
{
static void Main()
{
using (var client = new WebClient())
{
Stopwatch watch = Stopwatch.StartNew();
var data = client.DownloadData("http://news.bbc.co.uk");
watch.Start();
Console.WriteLine("{0} ms", watch.ElapsedMilliseconds);
}
}
}
Prints 880 ms on my PC.