Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - Perfromance Sluggish
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Perfromance Sluggish

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


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Topic: Perfromance Sluggish
    Posted: 18 July 2008 at 9:37am
I have a project that I've been posting about over the last few days or so that is using a majority of the CJ controls. I've noticed the general performance, used with the skin control, declines greatly.

Granted, I would say I have a lot of controls on the form, and there are multiple commandbars,panes, splitters, etc... but that doesn't seem to affect it when the Skinning is turned off -so maybe that explains it and thats fine. I don't really notice any performance issues on a less complex form. However, I am having difficulties 'managing' the sluggishness.

My idea is to create a screen-cover during skin change (much like window blinds when it blurs out the background and displays a logo in the center of the screen).

The problem I face is that the Skin Framework control doesn't have any events to fire off and let me know when the skin change is done and performance is back to normal. Sometimes it How do you get around this?

It almost seems like all the skin code fires, then continues on with the program long before the responsiveness is back.
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2008 at 9:32am
Just checking in to see if anyone has any input on this matter. Thanks!
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2008 at 2:46am
Hi,
 
When you say it's slow, do you mean when form is showing it's still not skinned?
 
I have a startup screen and sometimes I see that skin is removed and a second later it's back. But I have to say I see this also with other applications that have skin on my computer. Maybe it's MS related and when CPU is busy with a lot of other processes it "forgets" to finish the skin part (or it's just that my PC is slow and lots of installed programs which are running) Don't know, think we have to ask Bill himself
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2008 at 8:42am
Actually, it shows as skinned - well, the visible controls do at least.. I have a bunch of frames, tabcontrolpages, etc... that aren't visible right away so perhaps its all of those skinning... If I remove the skinning code, it doesn't display the behavior at all.
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2008 at 11:50am
I have uploaded a sample of what is occuring. This is a 73mb AVI file, so I reccomend downloading and then viewing it.

http://www.jasongoldberg.com/files/skinprob.avi

I am using the commandbar button animation as a demonstration of the application's responsiveness.. notice the responsiveness stops.... then starts again, then seems to stop once more only to finally recover and become responsive...

Here is the code for the skinning form which controls all of the skinning.



Option Explicit

Public Skin As Integer
Dim SkinsList As String


Public Function GetSkinList() As String()
  GetSkinList = Split(SkinsList, "~")
End Function

Private Sub Form_Load()

 'Basically just loads all CJStyles, MSStyles, and Skin Directories into an array

  If inIDE Then Exit Sub
 
  Dim fso As New FileSystemObject
  Dim fld As Folder
  Dim fil As File
  Dim C As Long
  Dim tFld As Folder
  Dim D() As String
  Set fld = fso.GetFolder(App.Path & "\skins\")
 
  Skinner.AutoApplyNewThreads = True
 
  For Each fil In fld.Files
    ReDim Preserve Skins(C)
    Skins(C).FileLocation = fil.Path
    D = Split(fil.Name, ".")
    Skins(C).Type = Left(D(1), 1)
    If Skins(C).Type = "c" Then Skins(C).iniFile = "NormalBlue.ini"
    Skins(C).Name = D(0)
    SkinsList = SkinsList & D(0) & "~"
    C = C + 1
  Next

  For Each tFld In fld.SubFolders
      ReDim Preserve Skins(C)
      For Each fil In tFld.Files
        If LCase$(Right$(fil.Name, 4)) = ".ini" Then
          Skins(C).iniFile = fil.Name
          Exit For
        End If
      Next
      Skins(C).FileLocation = tFld.Path
      Skins(C).Type = "d"
      Skins(C).Name = tFld.Name
      SkinsList = SkinsList & tFld & "~"
      C = C + 1
  Next
 
  SkinsList = Left(SkinsList, Len(SkinsList) - 1)

  Set fil = Nothing
  Set fld = Nothing
  Set fso = Nothing
  Set tFld = Nothing

End Sub



Public Function ApplySkin(vHwnd As Long, Optional SkinIndex As Integer)
  If inIDE Then Exit Function
   
  Skinner.ExcludeModule "msctf.dll"
  Skinner.LoadSkin Skins(SkinIndex).FileLocation, Skins(SkinIndex).iniFile
  Skinner.ApplyOptions = xtpSkinApplyFrame Or xtpSkinApplyColors
  Skinner.ApplyWindow vHwnd

End Function






Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2008 at 1:16am
Hi,
 
I watched your "movie"  but it's hard to see what is happening. You could try to build a splashscreen and load all necessary code, after this you show the main form. So first lines of code (in splashscreen) will be the loading of the skin. I do it also, I have about 25 panes (attached to forms) and in the forms are functions which load (from database) to display lots of stuff. But if all loading is done and the splashscreen is hidden, the mainform will popup in a second and I don't see any glitches or what so ever.
 
Maybe this is an option for you?
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2008 at 8:36am
The splash screen would seem like the clear solution, however the problem is that I can not actually detect when the skinning is completely finished to unload the splash screen. In fact, right now I have a frame cover the form when the skin is changed with a "loading..." message, but I have to use a timer to control when it disappears for now....
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2008 at 8:55am
Hi,
 
The splashscreen will be loaded first and after you load all items in mainform, hide splashscreen.
 
Private Sub Form_Load() 'of mainform
   
    Dim visualStyle() As String
    On Error Resume Next
    visualStyle = Split(GetSetting(App.Title, "Settings", "VisualStyle", 1000), ",")
    
    SkinFramework.LoadSkin visualStyle(0), visualStyle(1)
    SkinFramework.Tag = visualStyle(0) & "," & visualStyle(1)
    SkinFramework.ApplyWindow frmMain.hWnd
    
    frmSplash.Show 'the splashscreen is already skinned, if all works well
    CreatePanes
    LoadProgramSettings
    Load...
    Load...
    Load...
    Load...
    Load...
    Load...
 
    'takes about 10 seconds to load all possible data
    frmSplash.Hide
 
Now my mainform is showing, but it show right away, no glitches or what so ever.
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2008 at 9:40am
Thats the thing though... if the skin takes (for example) 10 seconds to apply and become responsive, I only have about 2 seconds of loading to do.. Once everything finishes loading, the skin is still preventing the applications responsiveness.. That is why I am trying to find an event or something that will alert me that every control has been skinned properly.
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
Back to Top
meaningoflights View Drop Down
Groupie
Groupie


Joined: 27 October 2007
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote meaningoflights Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2008 at 12:17am
when you find it let me know!

maybe a item for the wishlist
Jeremy Thompson (MCSD)
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.125 seconds.