Click here to Skip to main content
15,893,668 members
Home / Discussions / C#
   

C#

 
QuestionThread Performance Pin
Member 368144317-Sep-09 23:47
Member 368144317-Sep-09 23:47 
AnswerRe: Thread Performance Pin
Nicholas Butler18-Sep-09 0:12
sitebuilderNicholas Butler18-Sep-09 0:12 
When Invoke is called from a worker thread, it sends a windows message to the UI thread which then runs the delegate. You are doing this for each string in your results, which will be slow.

You could run the db call on a worker thread and then call Invoke once with the entire ArrayList to populate the ComboBox.

Also, you should probably use a thread pool thread for this, either directly or using a BackgroundWorker.

Nick

----------------------------------
Be excellent to each other Smile | :)

AnswerRe: Thread Performance Pin
Luc Pattyn18-Sep-09 2:08
sitebuilderLuc Pattyn18-Sep-09 2:08 
QuestionWeb Browser Event Hook - Problems Pin
Jacobb Michael17-Sep-09 23:31
Jacobb Michael17-Sep-09 23:31 
AnswerRe: Web Browser Event Hook - Problems Pin
omizyurko6-Jun-11 2:21
omizyurko6-Jun-11 2:21 
AnswerRe: Web Browser Event Hook - Problems Pin
j to the 4n8-Nov-13 0:05
j to the 4n8-Nov-13 0:05 
QuestionHelp making threads work in C# similar to Java Pin
Cruces17-Sep-09 23:17
Cruces17-Sep-09 23:17 
AnswerRe: Help making threads work in C# similar to Java Pin
Nicholas Butler18-Sep-09 0:19
sitebuilderNicholas Butler18-Sep-09 0:19 
GeneralRe: Help making threads work in C# similar to Java Pin
Cruces18-Sep-09 2:14
Cruces18-Sep-09 2:14 
GeneralRe: Help making threads work in C# similar to Java Pin
Nicholas Butler18-Sep-09 4:17
sitebuilderNicholas Butler18-Sep-09 4:17 
GeneralRe: Help making threads work in C# similar to Java Pin
Cruces18-Sep-09 4:33
Cruces18-Sep-09 4:33 
QuestionHow can we set formats of excel sheet Pin
Gunjan pandey17-Sep-09 23:16
Gunjan pandey17-Sep-09 23:16 
QuestionDraw Controls in Layers Pin
softwarejaeger17-Sep-09 22:52
softwarejaeger17-Sep-09 22:52 
QuestionDatagridview refreshes automatically reflecting changes in database? Pin
LordZoster17-Sep-09 21:54
LordZoster17-Sep-09 21:54 
AnswerRe: Datagridview refreshes automatically reflecting changes in database? Pin
Christian Graus17-Sep-09 21:56
protectorChristian Graus17-Sep-09 21:56 
AnswerRe: Datagridview refreshes automatically reflecting changes in database? Pin
Tamer Oz17-Sep-09 22:05
Tamer Oz17-Sep-09 22:05 
GeneralRe: Datagridview refreshes automatically reflecting changes in database? Pin
Christian Graus17-Sep-09 22:07
protectorChristian Graus17-Sep-09 22:07 
GeneralRe: Datagridview refreshes automatically reflecting changes in database? Pin
Tamer Oz17-Sep-09 22:15
Tamer Oz17-Sep-09 22:15 
GeneralRe: Datagridview refreshes automatically reflecting changes in database? Pin
LordZoster17-Sep-09 22:17
LordZoster17-Sep-09 22:17 
GeneralRe: Datagridview refreshes automatically reflecting changes in database? Pin
Tamer Oz17-Sep-09 22:22
Tamer Oz17-Sep-09 22:22 
GeneralRe: Datagridview refreshes automatically reflecting changes in database? Pin
Christian Graus17-Sep-09 22:23
protectorChristian Graus17-Sep-09 22:23 
GeneralRe: Datagridview refreshes automatically reflecting changes in database? Pin
LordZoster17-Sep-09 22:44
LordZoster17-Sep-09 22:44 
GeneralRe: Datagridview refreshes automatically reflecting changes in database? Pin
Christian Graus17-Sep-09 23:59
protectorChristian Graus17-Sep-09 23:59 
GeneralRe: Datagridview refreshes automatically reflecting changes in database? Pin
Henry Minute18-Sep-09 3:01
Henry Minute18-Sep-09 3:01 
QuestionHow to obtain the switches' mac addres by SNMP Pin
scoket17-Sep-09 20:58
scoket17-Sep-09 20:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.