 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
zhang li Guest
|
Posted: Thu Jun 26, 2003 1:51 pm Post subject: Re: Using Canvas->Handle is 1000 times slower |
|
|
I also thought the speed question of VCL component.
The "property" not a real data, even use it like a data.
it has via a function call, after return data type, so be slow.
C++Builder keyword extensions
<property declaration> ::=
__property <type> <id> [ <prop dim list> ] = "{" <prop attrib list>
"}"
regards
Li
| Quote: | for (int i = 0; i < 1000;i++)
Draw(Form1->Canvas->Handle,pic);
because the results were on the slow side (12ms per draw Av) I decided to
optimize, and instead of getting the HDC each time I called it once at
the beginning of the function, stored the results and used that in the
loop
eg:
HDC hdc = Form1->Canvas->Handle;
for (int i = 0; i < 1000;i++)
Draw(hdc,pic);
SHOCK and Amazement!!!
my drawing routines increased in speed by 1000
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|