Click here to Skip to main content
15,887,267 members
Home / Discussions / C#
   

C#

 
GeneralRe: Control updating is slow Pin
Martin#19-Jul-07 21:23
Martin#19-Jul-07 21:23 
GeneralRe: Control updating is slow Pin
Geert van Horrik19-Jul-07 21:35
Geert van Horrik19-Jul-07 21:35 
GeneralRe: Control updating is slow Pin
Geert van Horrik19-Jul-07 21:47
Geert van Horrik19-Jul-07 21:47 
GeneralRe: Control updating is slow Pin
Martin#19-Jul-07 21:58
Martin#19-Jul-07 21:58 
GeneralRe: Control updating is slow Pin
Luc Pattyn19-Jul-07 3:29
sitebuilderLuc Pattyn19-Jul-07 3:29 
GeneralRe: Control updating is slow Pin
Geert van Horrik19-Jul-07 3:33
Geert van Horrik19-Jul-07 3:33 
GeneralRe: Control updating is slow Pin
Luc Pattyn19-Jul-07 3:51
sitebuilderLuc Pattyn19-Jul-07 3:51 
GeneralRe: Control updating is slow [modified] Pin
Luc Pattyn19-Jul-07 3:09
sitebuilderLuc Pattyn19-Jul-07 3:09 
Hi Geert,

all Controls have SuspendLayout, some also have BeginUpdate.
I dont know what the difference is, probably nothing.

some ideas/suggestions:

- I dont know anything about DB access, but most often I see SQL statements that fill
a DataTable/DataSet, then use that data. Wouldnt that be faster than looping a reader ?

- try your stopwatch on the database stuff independent of the control; if it takes say
5 seconds, then that's what it is, whatever you optimize in the control itself.

- having the splash in the main thread and the initialization in a background thread,
although intuitive, may be the wrong way: I suspect the foreground window and thread
to get priority over the background threads. There is a very complicated scheme of
mapping the 5+1 user defined thread priorities (Normal, aboveNormal, etc, onto the
32 integer levels XP is actually dealing with, and it depends on currentProcess
and window state). Your background worker may sit behind or next to some other
thread in same or other process, your main thread would not (unless the other
thread is "aboveNormal").
Please dont interpret this as a suggestion to start using "aboveNormal" yourself.
The system behavior soon gets very ugly if you do.

Hope this helps.

PS: I typically include logging in all my apps, and each log line starts automatically
with the current time (seconds and milliseconds), so I can more easily see what
happens when, and what takes (too) long.


-- modified at 9:14 Thursday 19th July, 2007


GeneralRe: Control updating is slow Pin
Geert van Horrik19-Jul-07 3:27
Geert van Horrik19-Jul-07 3:27 
GeneralRe: Control updating is slow Pin
Luc Pattyn19-Jul-07 3:40
sitebuilderLuc Pattyn19-Jul-07 3:40 
GeneralRe: Control updating is slow Pin
Luc Pattyn19-Jul-07 3:45
sitebuilderLuc Pattyn19-Jul-07 3:45 
QuestionHow to unregister an event Pin
t4ure4n19-Jul-07 1:51
t4ure4n19-Jul-07 1:51 
AnswerRe: How to unregister an event Pin
kubben19-Jul-07 2:00
kubben19-Jul-07 2:00 
AnswerRe: How to unregister an event Pin
Luc Pattyn19-Jul-07 2:01
sitebuilderLuc Pattyn19-Jul-07 2:01 
GeneralRe: How to unregister an event Pin
Dan Neely19-Jul-07 2:19
Dan Neely19-Jul-07 2:19 
GeneralRe: How to unregister an event Pin
Luc Pattyn19-Jul-07 2:35
sitebuilderLuc Pattyn19-Jul-07 2:35 
GeneralRe: How to unregister an event Pin
Bijesh19-Jul-07 3:56
Bijesh19-Jul-07 3:56 
GeneralRe: How to unregister an event Pin
Luc Pattyn19-Jul-07 5:32
sitebuilderLuc Pattyn19-Jul-07 5:32 
GeneralRe: How to unregister an event Pin
Luc Pattyn24-Jul-07 6:46
sitebuilderLuc Pattyn24-Jul-07 6:46 
GeneralRe: How to unregister an event Pin
Martin#19-Jul-07 2:33
Martin#19-Jul-07 2:33 
GeneralRe: How to unregister an event Pin
Luc Pattyn19-Jul-07 2:38
sitebuilderLuc Pattyn19-Jul-07 2:38 
GeneralRe: How to unregister an event Pin
Martin#19-Jul-07 2:48
Martin#19-Jul-07 2:48 
AnswerRe: How to unregister an event Pin
b_umika19-Jul-07 2:01
b_umika19-Jul-07 2:01 
QuestionGenerating a program ID Pin
Muntyness19-Jul-07 1:49
Muntyness19-Jul-07 1:49 
AnswerRe: Generating a program ID Pin
ekynox19-Jul-07 2:04
ekynox19-Jul-07 2:04 

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.