This is my C# code.
WebClient client = new WebClient();
while (true) {
html = client.DownloadString("http://google.com");
Console.WriteLine(string.Format("\tSize: {0}", html.Length));
}
It takes around 9 seconds to get the first result. Then it takes around 3 seconds each.
When I do it with Java, it takes less than 1 second.
Why do you think it’s so slow with C#? How can I improve it?
You may have a problem with your network (as Mark comments).