November Happy Hour will be moved to Thursday December 5th.

Quan Mai
Jan 20, 2015
  2596
(0 votes)

Don’t let CatalogEntryFull slows you down.

Just like any EPiServer products, one of main concern of us when developing Commerce is performance. Why many parts of Commerce can be described as “Good enough”, some parts are just acceptable, and I must admit that there’s area where performance need to be improved to meet customer’s expectation.

We are under an intensive performance improvement process which we try to optimize our code to cut out any slow code we can found. And one thing come to my mind when I investigate the impact of CatalogEntryResponseGroup. Let’s see the dotTrace profile for CatalogEntryFull value:  CatalogEntryFull

You can see how insane CatalogEntryFull can do. It’s more than 4000 call to LoadEntryWorker just to load 9 Entry.

The terrible secret behind CatalogEntryFull is when you use it, Catalog system will try to load everything of the CatalogEntryDto, along with associations and children, recursively. The more complex and related your catalog entry is, the slow CatalogEntryFull becomes.

While we recommend to use new content API:s whenever possible, there are still place where Entry/Entries being used, such as when you call CartHelper.AddToCart method. Be sure to use the minimal ResponseGroup which works for you, instead of throw the full-fledge, big and slow CatalogEntryFull.

 

TL, DR; you should avoid CatalogEntryFull if you don’t have too. Use it only you absolutely need it. Use most lightweight CatalogEntryResponseGroup enum that do the work for you. You might need to use several enum combined, such as Assets | Inventory, instead of just going for the bad, ugly and slow CatalogEntryFull.

Jan 20, 2015

Comments

Arve Systad
Arve Systad Jan 20, 2015 11:36 PM

I like what I read!

Every millisecond counts, and especially in solutions with thousands of products, all performance gains are extremely welcome.

Are there plans to get rid of the CatalogEntryDto-style APIs at some point, and let the "de facto product management" go through IContentLoader and other more modern interfaces?

Quan Mai
Quan Mai Jan 21, 2015 03:40 AM

I believe that it's our vision, but it won't happen anytime soon. We would support two API:s at the same time for smoother transition.



By the way, this blog post applies for EPiServer Commerce all version, from 1 R1 to latest nuget package.

Please login to comment.
Latest blogs
Adding Geolocation Personalisation to Optimizely CMS with Cloudflare

Enhance your Optimizely CMS personalisation by integrating Cloudflare's geolocation headers. Learn how my Cloudflare Geo-location Criteria package...

Andy Blyth | Nov 26, 2024 | Syndicated blog

Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog

I'm running Optimizely CMS on .NET 9!

It works 🎉

Tomas Hensrud Gulla | Nov 12, 2024 | Syndicated blog