Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8754967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:44:56+00:00 2026-06-13T13:44:56+00:00

I am using .Net 4.0 and VS2010. My program is simply a multi-threaded get

  • 0

I am using .Net 4.0 and VS2010.

My program is simply a multi-threaded get request sender which update a bindingList and display the list via DataGridView. The datagridview is in virtual mode. Moreover, I make a textbox and status bar to display the status of requests, one request normally adds 4-5 lines to the textbox and changes the number in the status bar.

The workload remains the same, one request per two seconds. The request is fast and only one request is standing out most of the time. New request thread is called by the last old request thread. The UI is updated a few times per thread using begininvoke and delegate.

MyInvoke mi = new MyInvoke(change);
this.BeginInvoke(mi, new Object[] { true, "Row " + pos + " standing by...", (pos + 1),0 });

I display the whole 3000 requests on the datagridview at the beginning with memory usage 30MB. When the 2XXX request is reached with memory usage 4XMB, I can see the status bar number and textbox updated slower and slower. For example, 2000->2001->2002->2003 becomes 2000->2003.

If I select the application window, sometimes the whole UI would even freeze. My datagridview is fixed on a few rows with virtual mode. I believe it is the problems of the UI thread. When it freezes, I can wait until all requests are done and everything becomes smooth again.

Any thoughts on what is happening?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:44:57+00:00Added an answer on June 13, 2026 at 1:44 pm

    Finally, I figured out why it was so slow. Noob like me might easily make this kind of error.
    The large number of begininvoke I used during the thread does affect but it is not significant enough to freeze the UI thread.

    The heavy workload is mainly bought by the below code which assign whole of the text to the textbox every time

     textbox1.Text += "string"
    

    The following code could solve it

    textbox1.AppendText("string")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using VS2010, C#, ASP.NET, I've inserted Ajax Control Toolkit Tab Container which works
I am developing a C# application using .NET Framework 4.0 in VS2010. It is
Using WPF .NET 4.0 in VS2010 RTM: I can't create a fullscreen WPF popup.
I am using VS2010 C#.NET 3.5 and application settings (the Settings.settings file). What I
I have this code written in .NET 4.0 using VS2010 Ultimate Beta 2: smtpClient.Send(mailMsg);
I'm using SQL Server 2008 as my database engine in a VS2010, C# ASP.NET
I am looping through a list for a spellchecker in vb.net (using vs 2010).
I'm using linq2sql and .net 3.5 with vs2010. I'm experiencing bad sql performance when
I'm using VS2010,C# to develop my ASP.NET web app, I'm using a .js file
I'm using VS2010,C# to develop my ASP.NET web app, sometimes I need to declare

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.