Skip to content
Permalink
Browse files

Performance profiler - logging individual IPageContentFilter executio…

…n time
  • Loading branch information
napernik committed Jan 14, 2020
1 parent 39b610c commit cca31ee8938f0ed63b5fa1e5b019f5a19b6e9162
Showing with 8 additions and 2 deletions.
  1. +8 −2 Composite/Core/WebClient/Renderings/Page/PageRenderer.cs
@@ -244,9 +244,15 @@ internal static void ProcessXhtmlDocument(XhtmlDocument xhtmlDocument, IPage pag
var filters = ServiceLocator.GetServices<IPageContentFilter>().OrderBy(f => f.Order).ToList();
if (filters.Any())
{
using (Profiler.Measure("Executing custom filters"))
using (Profiler.Measure("Executing page content filters"))
{
filters.ForEach(_ => _.Filter(xhtmlDocument, page));
filters.ForEach(filter =>
{
using (Profiler.Measure($"Filter: {filter.GetType().FullName}"))
{
filter.Filter(xhtmlDocument, page);
}
});
}
}
}

0 comments on commit cca31ee

Please sign in to comment.
You can’t perform that action at this time.