Performance issues with partial views in CMS

Vote:
 

Hi Team,

I am facing lot of performance issues with Partial views in CMS across the application. This issue is happending only for first request and subsequent requests are very quick. Very simple partial action method also taking min 10+ seconds to load for the first time.

First request issue is for all partial views. Lets say, i have two partial views in two different pages so in every page facing this performance issue.

This issue is happening mutiple times in a day.

Below is one sample examples in controller & views to return the partail view:

return PartialView("~/Views/IndustryPage/_Survey.cshtml", model);

Html.RenderPartial("~/Views/Shared/PagePartials/_Questions.cshtml", Model.Questions);

Below is the custom view engine configured in my application for episerver blocks.

/// <summary>
/// Extends the Razor view engine to include the folders ~/Views/Shared/Blocks/ and ~/Views/Shared/PagePartials/
/// when looking for partial views.
/// </summary>
public class SiteViewEngine : RazorViewEngine
{
private static readonly string[] AdditionalPartialViewFormats = new[] { TemplateCoordinator.BlockFolder + "{0}.cshtml" };

/// <summary>
/// Initializes a new instance of the <see cref="SiteViewEngine"/> class.
/// </summary>
public SiteViewEngine()
{
PartialViewLocationFormats = PartialViewLocationFormats.Union(AdditionalPartialViewFormats).ToArray();
}
}

Can any one help to to fix this issue? This issue is effecting entire application performance. 

Thanks,

Suresh B

#218939
Mar 25, 2020 18:11
Vote:
 

Could some one provide any suggestions on this issue?

Thanks,

Suresh B

#218985
Mar 26, 2020 18:54
Vote:
 

Hi Suresh,

You can try object caching on block levels with the help of the ISynchronizedObjectInstanceCache interface.

Thanks,

Sanjay Kumar

#219061
Mar 28, 2020 16:13
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.