|
From: Paresh on 14 May 2008 01:17 Hi, I have an MDI application. In view, I have created a property sheet. In one of the pages of this property sheet, I have to create ~50 different kinds of modeless dialogs, owned by property page. All these dialogs are needed in memory as long as the document is open in the session. I have created them at application start up. However, when I create two to three documents, my application gets very slow (~50 * 3 documents = ~150 dialogs in memory). The API CDialog::Create is taking time. Could you please suggest a solution for this ? Any help would be highly appreciated. Regards, Paresh.
From: Ajay Kalra on 14 May 2008 07:32 Dont know what the cause is but clearly there is something not kosher about so many dialogs at the same time. You should rethink the design where you create only the dialogs that are currently visible. --- Ajay "Paresh" <Paresh(a)discussions.microsoft.com> wrote in message news:720E14E0-A66E-424F-A787-71BB5069D831(a)microsoft.com... > Hi, > > I have an MDI application. In view, I have created a property sheet. In > one > of the pages of this property sheet, I have to create ~50 different kinds > of > modeless dialogs, owned by property page. All these dialogs are needed in > memory as long as the document is open in the session. I have created them > at > application start up. > > However, when I create two to three documents, my application gets very > slow > (~50 * 3 documents = ~150 dialogs in memory). The API CDialog::Create is > taking time. > > Could you please suggest a solution for this ? > Any help would be highly appreciated. > > Regards, > Paresh.
From: Joseph M. Newcomer on 14 May 2008 08:20 I've done property sheets that generate on the order of 1,500 windows in several hundred dialogs, and we could bring up multiple instances of these, and it ran fine on Win95 on 500MHz laptops, so I suspect there is a lot more going on in your program than you are suggesting. For example, is threading involved? Do you have lots of WM_TIMER messages? (I had one per property sheet, for example). When you say CDialog::Create "is taking time", what did you use to measure the performance of this call? You have given absolutely no useful information about what your application is doing that would help in the slightest in figuring out what the performance problem is. Since I have evidence that it is not the quantity of windows or dialogs, it has to be something else. joe On Tue, 13 May 2008 22:17:00 -0700, Paresh <Paresh(a)discussions.microsoft.com> wrote: >Hi, > >I have an MDI application. In view, I have created a property sheet. In one >of the pages of this property sheet, I have to create ~50 different kinds of >modeless dialogs, owned by property page. All these dialogs are needed in >memory as long as the document is open in the session. I have created them at >application start up. > >However, when I create two to three documents, my application gets very slow >(~50 * 3 documents = ~150 dialogs in memory). The API CDialog::Create is >taking time. > >Could you please suggest a solution for this ? >Any help would be highly appreciated. > >Regards, >Paresh. Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Anders Karlsson on 14 May 2008 20:50 On Tue, 13 May 2008 22:17:00 -0700, Paresh <Paresh(a)discussions.microsoft.com> wrote: > Hi, > > I have an MDI application. In view, I have created a property sheet. In one > of the pages of this property sheet, I have to create ~50 different kinds of > modeless dialogs, owned by property page. All these dialogs are needed in > memory as long as the document is open in the session. I have created them at > application start up. > > However, when I create two to three documents, my application gets very slow > (~50 * 3 documents = ~150 dialogs in memory). The API CDialog::Create is > taking time. > > Could you please suggest a solution for this ? > Any help would be highly appreciated. > > Regards, > Paresh. I think if I were you I would start by adding lots of TRACE statements in your program to check the flow and what events are fired when. That way you get also some timing if you use dbgview (sysinternals) to look at the trace. -- Freedom is not worth having if it does not include the freedom to make mistakes. /Mahatma Gandhi
From: Paresh on 15 May 2008 00:45 Thanks for all your replyes. I am figuring out the exact problem area. Thank you very much to all for your suggestions. Regards, Paresh. "Anders Karlsson" wrote: > On Tue, 13 May 2008 22:17:00 -0700, Paresh > <Paresh(a)discussions.microsoft.com> wrote: > > > Hi, > > > > I have an MDI application. In view, I have created a property sheet. In one > > of the pages of this property sheet, I have to create ~50 different kinds of > > modeless dialogs, owned by property page. All these dialogs are needed in > > memory as long as the document is open in the session. I have created them at > > application start up. > > > > However, when I create two to three documents, my application gets very slow > > (~50 * 3 documents = ~150 dialogs in memory). The API CDialog::Create is > > taking time. > > > > Could you please suggest a solution for this ? > > Any help would be highly appreciated. > > > > Regards, > > Paresh. > > I think if I were you I would start by adding lots of TRACE statements > in your program to check the flow and what events are fired when. That > way you get also some timing if you use dbgview (sysinternals) to look > at the trace. > > -- > Freedom is not worth having if it does not include the freedom to make mistakes. > /Mahatma Gandhi >
|
Pages: 1 Prev: Deleting a file used by another process. Next: show a jpg picture on a dialog |