Jaa


All References Tips and Tricks: Improving Memory Utilization

The All References Add-in is described in some detail in the previous post.

 

If you often open MPs that are referred to by a lot of other MPs (in your reference folders), you may find that the All References Add-in consumes a lot of memory during its search. This only applies to often-used library MPs such as the ones that ship with System Center Operations Manager 2007 and any of the later versions.

If you often find yourself in this situation, this article is for you. If you do not see any problems with memory utilization when using the All References Add-in, I would not recommend applying the changes described in the rest of this post.

 

There exists a hidden setting that allows you to control how the add-in optimizes its search. It is called SearchOptimization and it has the following 2 allowed values:

Time This is the default value for this setting. With this set, the add-in will perform the search as fast as possible at the cost of using more memory. The actual memory consumption is proportional to the number of MPs that refer to the currently open MP. With this setting, only the first search takes some time. Subsequent searches are instant. The majority of MPs do not have many MPs referring to them. As such, this setting will work perfectly without any significant memory consumption issues.
Memory Setting SearchOptimization to Memory causes the add-in to perform the search more slowly. However, the memory consumption is fixed and does not grow with the number of MPs that refer to the currently open MP. The first and subsequent searches take exactly the same amount of time. It is appropriate to use this setting in situations when you have a large number of MPs in your reference folders and you often want to find references to MP elements declared in system libraries. (And only if your machine has very little RAM.)

In order to change the setting from the default, you need to find your Authoring Resource Kit installation directory. It should be either C:\Program Files\System Center MP Authoring Console 2007 or C:\Program Files (x86)\System Center MP Authoring Console 2007. In that directory, there is a file called Microsoft.EnterpriseManagement.UI.MPAuthoring.exe.config. (If Windows Explorer is hiding extensions of known file types, you will only see Microsoft.EnterpriseManagement.UI.MPAuthoring.exe and file type XML Configuration File.)

Make a backup copy of the file just in case something goes wrong.

Open that file with your favorite text or XML editor. If you are using Windows Vista or later, you will need to run the editor as Administrator.

Find the following snippet in the opened file:

    1:  <Addin>
    2:    <Type>Microsoft.EnterpriseManagement.AuthoringExtensibility.AllReferencesAddin.AllReferencesAddin,Microsoft.EnterpriseManagement.AuthoringExtensibility.AllReferencesAddin</Type>
    3:    <Settings>
    4:      <Setting>
    5:        <add>CrossMPSearch</add>
    6:        <value>Enabled</value>
    7:      </Setting>
    8:      <Setting>
    9:        <add>CachePopulationStrategy</add>
   10:        <value>Incremental</value>
   11:      </Setting>
   12:      <Setting>
   13:        <add>ResultsFormStyle</add>
   14:        <value>ListView</value>
   15:      </Setting>
   16:      <Setting>
   17:        <add>SearchOptimization</add>
   18:        <value>Time</value>
   19:      </Setting>
   20:    </Settings>
   21:    <DefaultResourceFileName>Microsoft.EnterpriseManagement.AuthoringExtensibility.AllReferencesAddin.Resources</DefaultResourceFileName>
   22:    <Actions>
   23:      <Action TextId="ShowReferences" OnAction="ShowReferences" IconId="AllReferencesIcon_16">
   24:        <TargetType Type="^ClassType$" />
   25:        <TargetType Type="^RelationshipType$" />
   26:        <TargetType Type="^Discovery$" />
   27:        <TargetType Type="^UnitMonitor$" />
   28:        <TargetType Type="^UnitMonitorType$" />
   29:        <TargetType Type="^DependencyMonitor$" />
   30:        <TargetType Type="^AggregateMonitor$" />
   31:        <TargetType Type="^Rule$" />
   32:        <TargetType Type="^SecureReference$" />
   33:        <TargetType Type="^DataSourceModuleType$" />
   34:        <TargetType Type="^ConditionDetectionModuleType$" />
   35:        <TargetType Type="^ProbeActionModuleType$" />
   36:        <TargetType Type="^WriteActionModuleType$" />
   37:      </Action>
   38:    </Actions>
   39:  </Addin>

The following part of the above file controls the value of the SearchOptimization setting:

    1:  <Setting>
    2:    <add>SearchOptimization</add>
    3:    <value>Time</value>
    4:  </Setting>

Replace Time with Memory:

    1:  <Setting>
    2:    <add>SearchOptimization</add>
    3:    <value>Memory</value>
    4:  </Setting>

Save the file and run the Authoring Console. If the Authoring Console should not display any error messages if the file was modified correctly. (Make sure you have a backup or you will have to uninstall and reinstall the Authoring Resource Kit to restore the file.)

If you want to go back to the previous setting, just change Memory back to Time and restart the Authoring Console.

 

This posting is provided "AS IS" with no warranties.

Use of included tools and reports are subject to the terms specified at

https://www.microsoft.com/info/cpyright.htm