Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - How to speed the TaskPanel up?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to speed the TaskPanel up?

 Post Reply Post Reply
Author
Message
leojay View Drop Down
Groupie
Groupie


Joined: 07 March 2005
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote leojay Quote  Post ReplyReply Direct Link To This Post Topic: How to speed the TaskPanel up?
    Posted: 07 March 2005 at 1:31am

I added a Taskpanel into a form, and typed these code:

Private Sub Form_Load()
    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
   
    MsgBox "It takes " & CDbl((dwEnd - dwStart) / 1000) & " seconds."
End Sub

I found that it took me about 6 seconds to add only 250 items.
Is there any way to speed that up?

BTW: my test environment is CPU:Pentium(R) M 1400MHz, Memory: 768MB, OS: Microsoft Windows XP Home with SP2

Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2005 at 1:56am

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?

Back to Top
leojay View Drop Down
Groupie
Groupie


Joined: 07 March 2005
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote leojay Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2005 at 2:33am

Thanks for your reply.

I am using TaskPanel as a toolbox.
and there are about 200 items of 20 groups in the toolbox.
but, unfortunately, the inefficient TaskPanel makes me very headachy.

i tried the sample on a P4 2.8G computer, and it took 8.7 seconds....

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2005 at 9:51am
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
Back to Top
leojay View Drop Down
Groupie
Groupie


Joined: 07 March 2005
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote leojay Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2005 at 7:19pm

Is that a new property of TaskPanel? My VB6.0 with SP6 reported an error:
"Object doesn't support this propertyr method". and the cursor stopped at the first line: "wndToolBox.LockRedraw = True"

i'm using 9.51 version.

Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2005 at 8:09pm

Yes, it is indeed a new feature of version 9.60.

http://www.codejock.com/products/suite/release_notes.htm

Back to Top
leojay View Drop Down
Groupie
Groupie


Joined: 07 March 2005
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote leojay Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2005 at 8:57pm
could that property speed up evidently?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2005 at 9:12pm
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.
Back to Top
leojay View Drop Down
Groupie
Groupie


Joined: 07 March 2005
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote leojay Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2005 at 9:53pm

Thank you!!

 I got it.

but , would "a slight delay" be more than 3 seconds?

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2005 at 10:43pm
For me I think it was anywhere from 3-6 seconds.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2005 at 10:43am
It is not "a slight delay" it is animation :)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.