How to improve HttpWebRequest's performance ?
thks for your comein, my question is that:
I use HttpWebRequest to get one URL content with "GET" Method,
and many guys want to get it like me,
I try to get the message first while the URL content change,
but I always slower than the others.
I want to know how to improve HttpWebRequest's performance effectively.
my general code :
int interval = 10;
Thread = null;
void Query(string url)
{
while(true){
thread = new Thread(new ThreadStart(()=>{
try{
HttpWebRequest request = (HttpWebRequest)Webrequet.creaete(url);
....
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response....Stream());
this.ExecuteHtmlHanlder(reader.ReadToEnd());
}catch{...}
}));
thread.IsBackGround = true;
thread.Start();
Thread.Sleep(interval);
}
}