Results 1 to 2 of 2

Thread: Get www site ( Screen Scrapes ) faster??? -= .NET C# / VB.NET =-

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    51

    Question Get www site ( Screen Scrapes ) faster??? -= .NET C# / VB.NET =-

    Hi!!

    I have some code that get the contant of a site and display it...
    it's a windows form application....

    but it's too slow ( BTW: my internet connection isn't slow )

    here is my code:

    Code:
    			textBox1.Text = String.Empty;
    
    			WebClient currentWebClient = new WebClient();
    
    			string strURL = _txtSiteUrl.Text.Trim();
    
    			byte[] aRequestedHTML;
    
    			aRequestedHTML = currentWebClient.DownloadData( strURL );
    
    			UTF8Encoding currentUTF8Encoding = new UTF8Encoding();
    
    			string strRequestedHTML;
    
    			strRequestedHTML = currentUTF8Encoding.GetString( aRequestedHTML );
    
    			textBox1.Text = strRequestedHTML;

    the code problem is this part:

    Code:
    aRequestedHTML = currentWebClient.DownloadData( strURL );

    What can I do to get a better performance?




    Kind Regards,

    gicio

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Nothing.

    The lag is most likely in part due the response time of the web server you are trying to connect to.

    Some websites are delivered via proxy, so you get a cached version which are delivered fast, others are actually delivered on-demand.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width