Created
June 11, 2015 13:30
-
-
Save kamsar/f2aa92ef3f63f3c7b931 to your computer and use it in GitHub Desktop.
Revisions
-
kamsar created this gist
Jun 11, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ var items = Sitecore.Context.Database.GetRootItem().Axes.GetDescendants(); Response.Write("<h1>{0} Items</h1>".FormatWith(items.Length)); var sw = new Stopwatch(); sw.Start(); var displayNamesScapi = items.Select(item => item[FieldIDs.DisplayName]).ToList(); sw.Stop(); Response.Write("<h1>SCAPI {0}ms</h1>".FormatWith(sw.ElapsedMilliseconds)); sw.Restart(); var displayNamesSynthesis = items.AsStronglyTypedCollection().Select(x => x.DisplayName).ToList(); sw.Stop(); Response.Write("<h1>Synthesis {0}ms</h1>".FormatWith(sw.ElapsedMilliseconds)); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ 5148 Items SCAPI 20ms Synthesis 57ms