O
oafyuf
Hi,
I'm having performanbce issues with StreamReader and was wondering
what I could do to improve it...
The following takes around 3 seconds to process! The content of the
response is:
"<?xml version="1.0" ?><ERROR>ORA-01403: no data found</ERROR>"
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strURIQuery);
req.Method = "GET";
req.Credentials = new NetworkCredential(strUser, strPass);
StreamReader stream = new
StreamReader(req.GetResponse().GetResponseStream());
StringBuilder sbXMLResponse0 = new StringBuilder();
//## start timer here
while((strLineXMLResponse = stream.ReadLine()) != null)
{
if(strLineXMLResponse.Length > 0 )
{
sbXMLResponse0.Append(strLineXMLResponse);
}
}
//## end timer here
I also tried:
strLineXMLResponse = stream.ReadToEnd();
with similar processing times. The response times are sub-second - I
think I have correctly isolated the performance issue to the
StreamReader.
Any help would be much appreciated.
Thanks,
Oafyuf
I'm having performanbce issues with StreamReader and was wondering
what I could do to improve it...
The following takes around 3 seconds to process! The content of the
response is:
"<?xml version="1.0" ?><ERROR>ORA-01403: no data found</ERROR>"
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strURIQuery);
req.Method = "GET";
req.Credentials = new NetworkCredential(strUser, strPass);
StreamReader stream = new
StreamReader(req.GetResponse().GetResponseStream());
StringBuilder sbXMLResponse0 = new StringBuilder();
//## start timer here
while((strLineXMLResponse = stream.ReadLine()) != null)
{
if(strLineXMLResponse.Length > 0 )
{
sbXMLResponse0.Append(strLineXMLResponse);
}
}
//## end timer here
I also tried:
strLineXMLResponse = stream.ReadToEnd();
with similar processing times. The response times are sub-second - I
think I have correctly isolated the performance issue to the
StreamReader.
Any help would be much appreciated.
Thanks,
Oafyuf