Tuesday, February 23, 2016

GlassCast In Glass mapper

Recently I was revieiwing one of the sitecore repository and I got to see the extensive use of GlassCast in the codebase . I quickly checked in glass mapper site and I happened to see this blogpost. http://www.glass.lu/Blog/GlassCast

Sometimes we overlooked such abstract implementation and just use them in our solution. It depends whether this is coded for high critical enterprise application then ofcourse such use of library will haunt you when it is tested against high user volume. It is sometimes mandatory to hook up your system to undergo performance soak test and load test to give comfort and confidence.

This is what it states in the blog

var item = Sitecore.Context.Item;
var model = item.GlassCast<MyModel>();
From some basic performance tests we can see that for 10000 item requests that using one SitecoreService to get an item takes around 94ms vs 164ms when using GlassCast! That is a big difference.

 
Post a Comment