Make container load async

Vote:
 

Hi, new to epi server here.

We have complex logic in one of the containers in our homepage, it's causing the page to render slowly as the entire page is waiting for this container to process.

Is there a way to mark this container as async so it can be called to populate once the homepage has rendered the rest of the page? It would need a client side change to initiate the call once the page is rendered and also a async/ajax method to return the calculated container after processing.

Hoping theres something we can do here.

#142776
Dec 22, 2015 22:07
Vote:
 

Hi,

By "container" do you mean a content area on the page, that contains a block/page/whatever - that loads slowly?

#142818
Dec 30, 2015 22:12
Vote:
 

Yes, exactly. I guess it's a block I'm talking about.

#142819
Dec 30, 2015 22:19
Vote:
 

If you are looking to make it async on the server (using parallel execution, async in C# or whatever other technology) - overall request lenght may still be as long as slowest block.

If you are looking for a way to improve end-user experience and load page faster and then load content later - then you really need to take a look at delivering content via other channels - like Ajax calls back to your service (most probably WebApi controller) that will deliver markup back to the page.

This is not built-in into the platform, but guess - not so hard to build one. You may find inspiration in Allan's amazing work on CMS Service API (https://github.com/AThraen/ServiceAPIExtensions) as extension of existing set of Service APIs mostly for Commerce.

#142824
Dec 30, 2015 22:44
* 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.