Assemblies loading optimization

Docking/MDI for WPF Forum

Posted 6 years ago by rex hui
Version: 17.2.0665
Avatar

Our main window used the following assemblies:

ActiproSoftware.Docking.Wpf
ActiproSoftware.Ribbon.Wpf
ActiproSoftware.Shared.Wpf
ActiproSoftware.Themes.Office.Wpf

Other dialogs which are not loaded during startup, reference the following assemblies:

ActiproSoftware.Editors.Wpf
ActiproSoftware.Grids.Wpf
ActiproSoftware.Navigation.Wpf

However, I noticed the the followings are loaded when the main window is launched:

ActiproSoftware.Docking.Wpf
ActiproSoftware.Shared.Wpf
ActiproSoftware.Editors.Wpf
ActiproSoftware.Grids.Wpf
ActiproSoftware.Ribbon.Wpf
ActiproSoftware.Navigation.Wpf
ActiproSoftware.Themes.Office.Wpf

Particularly, I don't expect the bolded ones to be loaded. Did I accidentally use them or there are some kind of dependencies between them.

I am trying to optimize the load time of our application.

Thank you.

Comments (4)

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

Hello,

None of the controls assemblies that you mentioned reference the bolded control assemblies so I'm not sure.  Maybe step through your code and see at which point that they get loaded and narrow it down that way.

When one of our controls is first used, it will look for license info.  If our licensing code doesn't find a license in the entry (application) assembly context, it will scan all assemblies in the app domain to see if any of those have a license.  That's the only thing from our end I can think of that could be loading the assemblies.  As long as you have licensing set up properly in your app project, that scanning should never really happen in a released .exe.


Actipro Software Support

Posted 6 years ago by rex hui
Avatar

Turns out it was caused by this one line in App.xaml:

<Thickness x:Key="{x:Static themes:AssetResourceKeys.TabbedMdiContainerTabControlBorderNormalThicknessKey}">0</Thickness>

<Application x:Class="WpfAppLoad.App"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfAppLoad"
xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"

StartupUri="MainWindow.xaml">
<Application.Resources>
<Thickness x:Key="{x:Static themes:AssetResourceKeys.TabbedMdiContainerTabControlBorderNormalThicknessKey}">0</Thickness>
</Application.Resources>
</Application>

Any idea why? and how to fix that?

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

Hmm, I'm not sure.  AssetResourceKeys itself doesn't load anything but the Shared library.  But perhaps since the themes xmlns defined as "http://schemas.actiprosoftware.com/winfx/xaml/themes" is used in multiple assemblies, that is triggering the load of the other assemblies?

You could perhaps test this by changing the themes xmlns there to something like this:

xmlns:themes="clr-namespace:ActiproSoftware.Windows.Themes;assembly=ActiproSoftware.Shared.Wpf"


Actipro Software Support

Posted 6 years ago by rex hui
Avatar

You are right! Thank you!

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.