Ticket Q283200
Visible to All Users

How to speed up loading of a custom pop-up form?

created 13 years ago

Hi Oleg,
as far as I can see it works fine.
Thanks.
Still there is the performance issue.
Obviously ths issues are not given using the buld in searchlookupedit or any other kind of popupgrids build into devexpress.
Do you see a chance by using a CustomBlogGridPopupForm-descendant or the SearchLookUpEdit popup form-descendant I can speed up the popup and also have my multiselection?
Thanks,
Chris

Answers approved by DevExpress Support

created 13 years ago (modified 12 years ago)

Hi Chris,
Thank you for your question. In your situation, the delay occurs when the pop-up form is first time shown. The time is consumed by the JIT compiler to compile MSIL into processor-specific machine code. It is possible to get rid of this delay by installing pre-compiled native images of your application executable file and all dependant assemblies on the machine where the application is executed.
To accomplish this task, use the Native Image Generator (Ngen.exe) tool. It will precompile your executable file and all dependant assemblies, and install them on the current machine. Here is the simplest scenario:
.NET 2.0 & >
For x86 target: C:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen.exe install C:/MyApp.exe
For x64 target: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\ngen.exe install C:/MyApp.exe
.NET 4.0 & >
For x86 target: C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe install C:\MyApp.exe
For x64 target: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install C:\MyApp.exe
As you can see, this operation is sensitive to the platform target and CLR version.
I also suggest that you read the following MSDN article, which describes how to generate native images when installing your application on the client machine: Walkthrough: Using a Custom Action to Compile a Binary to Native Code at Installation.
Thanks,
Uriah

    Comments (3)
    CP CP
    Christian Peters 13 years ago

      Hi Uriah,
      thanks for the information.
      Two things here:
      - I can't use ngen for several reasons.
      First: The app. has to start from a mapped network directory without any installation
      Second: No "installation" in that manner is given to start ngen
      - The subject of the topic is a little bit confusing (I changed it now).
      My question was, if I could speed up the form by using a CustomBlogGridPopupForm-descendant or the SearchLookUpEdit popup form-descendant instead of the current approach.
      Chris

      DevExpress Support Team 13 years ago

        Hi Chris,
        It does not matter what is used as a base class. The only reason why the SearchLookUpEdit popup-form is loaded a bit faster than the pop-up form used in your example is that the latter contain a lot of complex components.
        If you cannot use Ngen, try to execute the following code when the application starts. This should also improve the performance when the pop-up form is displayed for the first time:

        C#
        GridMultiSelectionEdit e = new GridMultiSelectionEdit(); GridMultiSelectionPopupForm f = new GridMultiSelectionPopupForm(e); f.Location = new Point(-1000, 0); f.Show(); e.Dispose(); f.Dispose();

        Thanks,
        Uriah

        CP CP
        Christian Peters 13 years ago

          Hi Uriah,
          works for me.
          Thanks

          Other Answers

          created 13 years ago

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.