How to speed the TaskPanel up? |
Post Reply |
Author | |
leojay
Groupie Joined: 07 March 2005 Status: Offline Points: 27 |
Post Options
Thanks(0)
Posted: 07 March 2005 at 1:31am |
I added a Taskpanel into a form, and typed these code: Private Sub Form_Load() I found that it took me about 6 seconds to add only 250 items. BTW: my test environment is CPU:Pentium(R) M 1400MHz, Memory: 768MB, OS: Microsoft Windows XP Home with SP2 |
|
gshawn
Senior Member Joined: 04 October 2004 Status: Offline Points: 227 |
Post Options
Thanks(0)
|
That is pretty average performance... I personally ran some tests a few weeks ago on my machine and did not find any speed issues, but that may have been due to the speed of my system. On my A64 3200+ your sample runs in 0.67s. I did not have a chance to run tests on an older system. I am wondering though, when would you ever need to add 250 elements to a Task Panel? |
|
leojay
Groupie Joined: 07 March 2005 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Thanks for your reply. I am using TaskPanel as a toolbox. i tried the sample on a P4 2.8G computer, and it took 8.7 seconds.... |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
wndToolBox.LockRedraw = True
Dim dwStart As Long Dim dwEnd As Long Dim Group As TaskPanelGroup Dim i As Integer dwStart = GetTickCount() Set Group = wndToolBox.Groups.Add(0, "test") For i = 1 To 250 Group.Items.Add i, "test" & CStr(i), xtpTaskItemTypeLink Next i dwEnd = GetTickCount wndToolBox.LockRedraw = False MsgBox "It takes " & CDbl((dwEnd - dwStart) / 1000) & " seconds." Edited by SuperMario |
|
leojay
Groupie Joined: 07 March 2005 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Is that a new property of TaskPanel? My VB6.0 with SP6 reported an error: i'm using 9.51 version. |
|
gshawn
Senior Member Joined: 04 October 2004 Status: Offline Points: 227 |
Post Options
Thanks(0)
|
Yes, it is indeed a new feature of version 9.60. |
|
leojay
Groupie Joined: 07 March 2005 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
could that property speed up evidently?
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Yes, it speeds it up. Without using LockRedraw it took about 8-14
seconds to load on my 1.7 Ghz P4. With LockRedraw it was 0-0.3
seconds. BUt keep in mind you still have a slight delay for the
initial draw of the TaskPanel.
|
|
leojay
Groupie Joined: 07 March 2005 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Thank you!! I got it. but , would "a slight delay" be more than 3 seconds? |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
For me I think it was anywhere from 3-6 seconds.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
It is not "a slight delay" it is animation :)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |