Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
AppStyling slowing down startup of app
posted

I have a winforms test application I have created that consists of one form that contains 3 UltraLabels, 1 UltraTextEditor, 1 UltraComboEditor and 2 UltraButtons.  After creating the form, dragging the components mentioned above onto the form and building,  I tried starting the app (there is no other code in the constructor).  The form popped up in about .5 of a second.  Then I created a .isl file for app styling saved the file and loaded the file using the following code:

Infragistics.Win.AppStyling.StyleManager.Load("TestStyleSet.isl", False)

The startup time went from .5 of a second to 2 seconds.  So I did another test to see if it was just AppStyling that was the culprit and created an empty StyleSet and it still took 2 seconds to start this simple app.  So then I decided I would not use app styling but rather style the controls I had put on the form individually.  I proceeded to set the UltraTextEditor's DisplayStyle as Office2007 with this line of code in the constructor:

        UltraTextEditor1.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007

and tried starting the app again.  The app took 1.6 seconds to start this time.  I then removed the above line of code from the constructor (no code is in the constructor now) and I was back to .5 of a second for startup time.

Is there a reason using appStyling or setting the DisplayStyle of an UltraTextEditor should affect the startup time of an application so significantly?  Is there a workaround for either of these scenarios? 

Thanks,

Daren

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Daren,

    I can't see any reason why either of these things would so significantly slow down the application.

    In what event did you load your isl file?

    In what event did you set the DisplayStyle? What if you set the DisplayStyle at design-time rather than at run-time?

    How exactly are you measuring the time it takes the form to load? My only guess here is that the form takes the same amount of time to load and paint, but if you are only measuring the load time, then calling into AppStylist or setting the DisplayStyle is simply forcing the assemblies to get loaded into memory earlier and thus affecting your timer, but not really slowing down the application. In other words, the assemblies have to be loaded at some point, and you are simply forcing them to load earlier and so they are being counted by whatever timer you are using, as opposed to later when the controls are painted for the first time.

    But this seems pretty unlikely.

Children