Print Page | Close Window

How to speed the TaskPanel up?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1922
Printed Date: 17 November 2024 at 9:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to speed the TaskPanel up?
Posted By: leojay
Subject: How to speed the TaskPanel up?
Date 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




Replies:
Posted By: gshawn
Date 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?



Posted By: leojay
Date 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....



Posted By: SuperMario
Date 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."


Posted By: leojay
Date 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.



Posted By: gshawn
Date 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 - http://www.codejock.com/products/suite/release_notes.htm



Posted By: leojay
Date Posted: 07 March 2005 at 8:57pm
could that property speed up evidently?


Posted By: SuperMario
Date 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.


Posted By: leojay
Date Posted: 07 March 2005 at 9:53pm

Thank you!!

 I got it.

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



Posted By: SuperMario
Date Posted: 07 March 2005 at 10:43pm
For me I think it was anywhere from 3-6 seconds.


Posted By: Oleg
Date Posted: 10 March 2005 at 10:43am
It is not "a slight delay" it is animation :)

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net