- This topic has 9 replies, 4 voices, and was last updated 13 years, 10 months ago by Support.
-
AuthorPosts
-
July 28, 2010 at 6:43 pm #33893LeandroParticipant
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.
August 2, 2010 at 9:43 am #43064SupportKeymasterDo you uses AlphaControls version 7?
Be sure that used skins have version 7 too, it's important (built-in skins too).August 2, 2010 at 12:59 pm #43053LeandroParticipantI 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.
August 2, 2010 at 3:04 pm #43084SupportKeymasterNovember 12, 2010 at 9:00 pm #43725LeandroParticipantI 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 beginif 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.
November 15, 2010 at 2:42 pm #43783SupportKeymasterHello and thank you for researching, I'll check it now.
November 26, 2010 at 9:45 am #44009eledhParticipantHello,
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.
December 1, 2010 at 8:37 am #44059SupportKeymasterHello Eledh and thank you for info.
I'll try to remove a GDI resources leak in the next BETA version.
January 4, 2011 at 1:02 pm #44327jaxxParticipantSame here. If I apply the skins to the application, it makes it really really slow. I need correctly functioning app in two days already 🙁
January 5, 2011 at 3:10 pm #44338SupportKeymaster'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.
-
AuthorPosts
- You must be logged in to reply to this topic.