Will probably start from results and then explain them below.

Tests were executed on the same Sitecore master database on 100000 items of same “Content Page” template.

Fortis vs glass

  • Get Item – here I have been using SitecoreService.GetItem() for Glass, ItemFactory.Select() for Fortis and Database.GetItem() for Sitecore API.
  • Read Field Value – assigning a field value from typed object to variable. Were reading one field per item.
  • Render Field – GlassHtml.Editable(item, x => x.Title) for Glass, item.Title.Render() for Fortis and FieldRenderer.Render() for Sitecore API.
  • Cast (interface) – Glass.Mapper provides an extension method for Sitecore.Data.Items.Item “.GlassCast()” which converts sitecore item into typed Glass object. Fortis has same functionality within SpawnProvider.FromItem(). In this case I have been converting items to generated model interface INavigation (which is one of base templates of Content Page template). In this case, Glass returns the Castle.Proxy.INavigationProxy object.
  • Cast (implementation) – the same as above but converting were done to concrete model type – Navigation.

Basically this chart displays all my concerns about tons of reflection being processed in Glass.Mapper in previous post. But what is interesting here is that casting to interface using proxies works faster than casting to concrete generated model type. One way or another, Fortis works faster and all cases are very close to plain Sitecore API.

Share article
See also

MVC renderings with xWrap framework – Sitecore Experience Wrapper

Read more Volodymyr Hil 10.12.2018

Introducing xWrap framework – Sitecore Experience Wrapper

Read more Volodymyr Hil 09.12.2018

A recap from Sitecore Symposium 2018 and MVP summit

Read more Volodymyr Hil 25.10.2018

Using the service bus to transfer messages between instance roles

Read more Volodymyr Hil 10.06.2018

Using Swagger in Sitecore solution as a helix feature

Read more Volodymyr Hil 19.02.2018