Instantly improves perf of content/media trees by updating the RecycleBinSmells methods - they were loading in ALL content that was in the bin before just to return a boolean! :(

This commit is contained in:
Shannon
2014-10-16 11:22:44 +10:00
parent bd0a1e66f2
commit e41e95d377

View File

@@ -11,7 +11,7 @@ namespace Umbraco.Core.Services
/// <returns></returns>
public static bool RecycleBinSmells(this IContentService contentService)
{
return contentService.GetContentInRecycleBin().Any();
return contentService.CountChildren(Constants.System.RecycleBinContent) > 0;
}
/// <summary>
@@ -21,7 +21,7 @@ namespace Umbraco.Core.Services
/// <returns></returns>
public static bool RecycleBinSmells(this IMediaService mediaService)
{
return mediaService.GetMediaInRecycleBin().Any();
return mediaService.CountChildren(Constants.System.RecycleBinMedia) > 0;
}
}
}