There was a timing component on DSP, it relied on using the RDTSC instruction, which 
means on windows you have to run it many times, as if a time sharing break occurs 
during a method call, then you get different results.

Means you need to take an average, or just rely on the minimum time returned.
I for one just use the CPU view and look at the code generated - normally less code = 
less time (in the general case).

Myles.

-----Original Message-----
From:   Chris Crowe [SMTP:[EMAIL PROTECTED]]
Sent:   Thursday, May 27, 1999 8:16 AM
To:     Multiple recipients of list Delphi
Subject:        [DUG]:  Drawing Speed

I am writing a custom scheduling control, which does a lot of drawing to the screen.

Do stop flicker I have created a bitmap the size of the client area of the control. I 
then draw the interface to the bitmap, and then I draw the bitmap to the screen using 
Canvas.Draw(0,0, MyBitmap);

I found this accetable when the control is small, but if it is say getting up to 
around 800 * 600 it takes a fair amount of time to draw. I have a timing component 
which states it takes 0.091 seconds on average to draw the image at the large screen 
size. You might say that it is quite fast. I suppose it is. But the control must 
support selecting of rows and scrolling of the window, much like a listbox. 

It is very much designed around the outlook/schedule plus style of their day view for 
their scheduling. 

Is there a faster way of drawing to the screen?, I have to draw to the bitmap becuase 
if I do not the screen flickers rather badly.

Outlook draws very fast, and I assume my routines are quite optimized but obviosly not 
enough. So is there a better way, am I better to use BitBlt to draw to the screen than 
the Canvas.Draw()?

Any other speed increasing tips would be greatly appreciated...

ps: Does anyone know of a profiler that will profile a component, instead of the 
application?

Chris


Christopher Crowe (Software Developer)
Microsoft MVP, MCP

Adrock Software
Byte Computer & Software LTD
P.O Box 13-155 
Christchurch
New Zealand
Phone/Fax (NZ) 03-3651-112

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

application/ms-tnef

Reply via email to