Performance on time consumption for New() window containing DockSite

Docking/MDI for WPF Forum

Posted 7 years ago by Fouques
Version: 12.1.0560
Avatar

Hello,

 

    I've created a very simple project to highlight the problem :

a mainwindow with two buttons that opens a second window, one with  a stackpanel and a label, second with also a docksite.

I tracked the time for New() procedure :

Window without docksite : about 4ms in debug, 2ms in release

Window with docksite : about 1400 ms for both configuration.

 

I'm quite surprised by the time needed to create a simple UI with empty dock site !! What is the trick to improve the time needed to load UI using Actipro component ?

 

Regards,

 

Stephane.

PS : I can provide the VS2010 project if you ask for

Comments (4)

Posted 7 years ago by Fouques
Avatar

PS : I forgot to precise that this needed time is only for the first New(), next New() are fast (about 3ms).

        Dim a As Date
        Dim b As Date

        a = Now
        myWindow = New Window1 '1600ms
        b = Now

        MessageBox.Show("New execution time : " & vbCrLf & (b - a).TotalMilliseconds & " ms")

        a = Now
        myWindowBis = New Window1 '3ms
        b = Now

        MessageBox.Show("New execution time : " & vbCrLf & (b - a).TotalMilliseconds & " ms")
Answer - Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Stephane,

The delay you are experiencing is most likely just because of the initial load time of our docking and shared assemblies. .NET loads an assembly the first time a type within it is used, which is why the first load time is long, then gets shorter the next time you create a new instance.


Actipro Software Support

Posted 7 years ago by Fouques
Avatar

Hi, 

Effectivly I was thinking about that... So, as I understand, I have to found a solution to pre-load the assembly and avoid this first delay on opening windows using actipro controls instances !

regards,

 

Stephane.

Answer - Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Stephane,

Yes, that's pretty much the idea. You could probably just reference a type from the assemblies you want to load in your startup code to force it to load then, and avoid the wait time later.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.