Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Progressbar slow / General request
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Progressbar slow / General request

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


Joined: 15 December 2008
Location: Germany
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote fuxi Quote  Post ReplyReply Direct Link To This Post Topic: Progressbar slow / General request
    Posted: 16 March 2010 at 8:43am
hi dear codejock team,

i've noticed an issue with the progressbar control:
it seems to slow down the app speed dramatically (vb6) without any cause.

just try:

    progress1.Max = 1000
    For i = 1 To 1000
        DoEvents
        progress1.Value = i
    Next

with a default progressbar (from the ms common controls) it takes < 1 sec
and using the codejock progressbar it almost takes 3 seconds!

what could it be?

2nd - as a satisfied codejock costumer i'd like to ask if it's possible to split up the controls into extra ocx?
when using only ONE control of the whole collection it takes several seconds to load it and really bloats little apps.
i hope you could do this also because there's a subclassing bug in the tabstrip control which causes lots of crashes.

thanks in advance
Back to Top
pate View Drop Down
Groupie
Groupie


Joined: 27 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote pate Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2010 at 4:14pm
Can someone at CodeJock please respond to this, I'm seeing the same thing.  With 3000 items it is the diffference in 1/2 second for the stock MS progress bar and close to 20 seconds for the CodeJock progress bar.  And I do NOT have DoEvents in my loop, just updating the value.  Unusable as it is.
 
For J = 1 To 3000
    ProgressBar1.Value = J
Next J
 
Thanks,
Melvyn Pate
registered and on support
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2010 at 5:27pm
What other settings are you using on your CJ progressbar?  Are you using the SkinFramework as well? What OS?

I'm trying to reproduce the problem, but while the CJ is a bit slower (particularly when using Office2007 mode), it is not nearly as slow as you are seeing.


Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
pate View Drop Down
Groupie
Groupie


Joined: 27 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote pate Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2010 at 5:53pm
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2010 at 6:00pm
Maybe you could try only updating the ProgressBar value if 1) The new value is different than the current value, and 2) the new value would actually move the position of the drawn value.

To do this, you could calculate the Max value based on the width of the ProgressBar instead of your real maximum value. Something like:


   Dim l_Count As Long: l_Count = 3000

   Me.ProgressBar1.Max = Me.ScaleX(Me.ProgressBar1.Width, Me.ScaleMode, vbPixels)
   For i = 1 To l_Count
      l_Value = i * (Me.ProgressBar1.Max / l_Count)
      If l_Value <> Me.ProgressBar1.Value Then
         Me.ProgressBar1.Value = l_Value
      End If
   Next i

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2010 at 6:38pm
So there's no question that the CJ ProgressBar is slower than the VB bar, although for me it isn't nearly as slow as it is for you (not sure why).

It seems that the problem likely has to do with how the CJ PB draws the control - my guess would be that the CJ PB completely redraws the control when the Value property is set, even if the new value wouldn't change the appearance of the control. My other guess is that the VBPB is optimized to only redraw itself if the change in value would result in a change of appearance, hence the performance discrepancy.

I've added this to the SuiteControls TODO list.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2010 at 6:46pm
Also fuxi, what's the subclassing bug you mentioned in the TabStrip? Could you start a new thread with some more information on this (or point me to an existing thread) so that I can add it to the TODO list?

Thanks a lot.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
pate View Drop Down
Groupie
Groupie


Joined: 27 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote pate Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2010 at 2:10pm
Thanks, that certainly is a lot better.  Still a little slower than the stock MS control, but not unusable.  I really hope CJ takes the time to look at little stuff like this bug.  I''ve seen it on at least 2 computers (three I think) and the other user reported it, so it is definitely an issue.  Just seems like the most basic of controls like this just ought to work and not even have to think about them.  Then other times they produce incredible controls like the Docking control, which is simply a thing of beauty,
 
-Melvyn
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.141 seconds.