I have windows form based utility that cranks out a few hundred thousand rows of mock data as a .CSV file. I'm simplifying a bit, but I want to log various activities as this windows form does its thing producing all these rows.
I wrote a trace listener and every trace.WriteLine("xxxxx") adds the trace text as a row to a DataGridView control on my form. While my program cranks out a 300,000+ rows of mock data, and adds each row's worth of log text to the DataGridView control, the control kinda freezes up, the whole form really. Is there a way to make it more responsive / refresh more often?
Thanks!
Background: Not to say it was the best pick, but I used a DataGridView on the form because with a multiline textbox I thought appending each Trace.WriteLine() would have worse performance(string concatenations). And I couldn't see a way to work a StringBuilder object into the mix to overcome the concatenations issue, plus with StringBuilder I was worried the string length might exceed Integer.MaxValue of the SB object. I'm open to any other patterns that get me towards having basically a big text scrollable logfile in the middle of my vb app.
I wrote a trace listener and every trace.WriteLine("xxxxx") adds the trace text as a row to a DataGridView control on my form. While my program cranks out a 300,000+ rows of mock data, and adds each row's worth of log text to the DataGridView control, the control kinda freezes up, the whole form really. Is there a way to make it more responsive / refresh more often?
Thanks!
Background: Not to say it was the best pick, but I used a DataGridView on the form because with a multiline textbox I thought appending each Trace.WriteLine() would have worse performance(string concatenations). And I couldn't see a way to work a StringBuilder object into the mix to overcome the concatenations issue, plus with StringBuilder I was worried the string length might exceed Integer.MaxValue of the SB object. I'm open to any other patterns that get me towards having basically a big text scrollable logfile in the middle of my vb app.