Skinned application becomes very slow over time

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #33893
    Leandro
    Participant

    After some time using a skinned application, it becomes very slow. The most curious thing is that all applications (ex. MS Office) becomes very slow too!

    After closing the skinned application, all applications restore its regular performance.

    Can you give me some advice?

    Leandro.

    #43064
    Support
    Keymaster

    Do you uses AlphaControls version 7?
    Be sure that used skins have version 7 too, it's important (built-in skins too).

    #43053
    Leandro
    Participant

    I don't use version 7 because it's a beta release.
    I'll try out and let you know about outcomes.

    Have you some idea about official release date?

    Thanks.

    Leandro.

    #43084
    Support
    Keymaster

    QUOTE (Leandro @ Aug 2 2010, 03:59 PM)
    Have you some idea about official release date?


    In this month, I think.

    #43725
    Leandro
    Participant

    I think I found it!

    I have noticed that sometimes the application consumes a large amount of GDI resources. I also noticed that the number of GDI objects (when I can simulate the issue) is still growing when I switch between pages of a TsPageControl (two new GDI objects at each page change).

    The AQTime confirmed that the blame for the increase in the number of GDI objects is the below highlighted code:

    Code:
    unit sSkinProvider;

    procedure TsSkinProvider.NewWndProc(var Message: TMessage);

    ….

    WM_ERASEBKGND : if Form.Showing then begin
    if (SkinData.CtrlSkinState and ACS_LOCKED = ACS_LOCKED) or FCommonData.FUpdating then Exit;
    if not (csPaintCopy in Form.ControlState) and (Message.WParam Message.LParam {PerformEraseBackground, TntSpeedButtons}) then begin

    if not IsCached(FCommonData) {and (Form.Parent = nil) }or ((Form.FormStyle = fsMDIForm) and (Form.ActiveMDIChild nil) and (Form.ActiveMDIChild.WindowState = wsMaximized)) then begin
    if (Form.FormStyle = fsMDIChild) and (FCommonData.FCacheBmp nil) then begin
    GetClientRect(TsSkinProvider(MDISkinProvider).Form.Handle, cR);
    if (PtInRect(cR, Form.BoundsRect.TopLeft) and PtInRect(cR, Form.BoundsRect.BottomRight)) then begin
    FCommonData.FCacheBmp.Height := min(FCommonData.FCacheBmp.Height, CaptionHeight + SysBorderHeight(Form.Handle, BorderForm) + LinesCount * MenuHeight + 1);
    FCommonData.BGChanged := True;
    end
    end;
    if not InAero then AC_WMEraseBkGnd(TWMPaint(Message).DC) else begin
    if (GetClipBox(TWMPaint(Message).DC, cR) = NULLREGION) or (WidthOf(cR) = 0) or (HeightOf(cR) = 0) then begin
    ——> DC := GetDC(Form.Handle); // it seems not be released by ReleaseDC function
    end
    else DC := TWMPaint(Message).DC;
    AC_WMEraseBkGnd(DC);
    end;

    So I included a call to ReleaseDC function and found that the increase in the number of GDI objects was really stopped.

    Could you check this?

    Thank you!

    Leandro.

    #43783
    Support
    Keymaster

    Hello and thank you for researching, I'll check it now.

    #44009
    eledh
    Participant

    Hello,

    I also got similar info from one user of my application. He described the same behaviour (weird slowing down of whole system).

    It never happened on my PC yet and I had not a chance how to investigate it.

    Now when I read this topic I tried something and I found one case where probably the mentioned “handle leak” occurs, for instance, when FontDialog or ColorDialog is used.

    Just try to open and close TFontDialog several times and GDI handles are still rising. (AC Lite, TsSkinManager with default values)

    Just for info if it helps you to investigate the root cause and fix it.

    #44059
    Support
    Keymaster

    Hello Eledh and thank you for info.

    I'll try to remove a GDI resources leak in the next BETA version.

    #44327
    jaxx
    Participant

    Same here. If I apply the skins to the application, it makes it really really slow. I need correctly functioning app in two days already 🙁

    #44338
    Support
    Keymaster
    'jaxx' wrote:

    Same here. If I apply the skins to the application, it makes it really really slow. I need correctly functioning app in two days already 🙁

    Please check this topic : http://www.alphaskins.com/forum/index.php?showtopic=5889

    I'll add a reasons of slow work there.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.