Makes the tree scanning and loading from the xml lazy so this no longer happens on startup but instead when trees are required, this ensures during startup there is no IO or scanning for trees, this should assist with U4-5126 config files get cleared out with zero size and of course also help a bunch with startup time.

This commit is contained in:
Shannon
2014-11-12 18:06:10 +11:00
parent 6903ebda1f
commit aa11d3504d
3 changed files with 245 additions and 104 deletions

View File

@@ -5,7 +5,17 @@ namespace Umbraco.Core.Services
{
public interface IApplicationTreeService
{
void Intitialize(IEnumerable<ApplicationTree> existingTrees);
/// <summary>
/// Initializes the service with any trees found in plugins
/// </summary>
/// <param name="allAvailableTrees">
/// A collection of all available tree found in assemblies in the application
/// </param>
/// <remarks>
/// This will update the trees.config with the found tree plugins that are not currently listed in the file when the first
/// access is made to resolve the tree collection
/// </remarks>
void Intitialize(IEnumerable<ApplicationTree> allAvailableTrees);
/// <summary>
/// Creates a new application tree.