i have a strange issue where content of different templates load slow the first time. so say i have a "product" template, the first product page i load will take something like 30 seconds but after that, all products will load quickly (<2 seconds).
this goes for all different types of templates. the first time loads extremely slowly and then all content of that template loads quickly thereafter (with the odd exception).
interestingly, this delay happens even with empty templates (i did this for testing purposes).
it's like each template is being compiled. is there anything i can do about this?
--edit--
just tested the same site on AWS using a t2.medium instance (whereas i'm using s3 on azure) and it's much faster on AWS.
the same issue is apparent in terms of a template taking longer to render on first attempt but it's much quicker. the same pages take 15 seconds on azure and 4 seconds on AWS. after initial template load, both environments load the content pages in less than a second.
In traditional hosting what you have described is potentially your application pool "waking up" and getting the site up and running. This is symptomatic of sites with low traffic volumes.
However, I am not sure about Azure and how this aspect works.
It might be worth looking into the Azure configuration to see if you are able to prevent this from occurring.
Also an option is to use a ping service (https://www.site24x7.com/ping-test.html) which will prevent the site from going to sleep.
this behaviour isn't the initial app pool startup delay. this happens per template. so even after the initial app startup that you describe, each different template takes a long time to render the first time.
I have a similar issue, however the loading times aren't that bad and I'm having quite alot of traffic so the pool doesn't go to sleep = I don't notice it usually.
However, this has something to do with the compiling of the views - I haven't figured it out exactly yet though.
So if you find anything about this, I'm interested as well. Whenever I have time to review this issue, I'll keep you updated :)
umbraco 7.13.1 slow on Azure
i have a strange issue where content of different templates load slow the first time. so say i have a "product" template, the first product page i load will take something like 30 seconds but after that, all products will load quickly (<2 seconds). this goes for all different types of templates. the first time loads extremely slowly and then all content of that template loads quickly thereafter (with the odd exception).
interestingly, this delay happens even with empty templates (i did this for testing purposes).
it's like each template is being compiled. is there anything i can do about this?
here is somebody else with the same problem https://our.umbraco.com/forum/templates-partial-views-and-macros/80840-different-templates-slow-on-first-load-umbraco-7-with-azure-hosting
thanks, Simon
--edit-- just tested the same site on AWS using a t2.medium instance (whereas i'm using s3 on azure) and it's much faster on AWS. the same issue is apparent in terms of a template taking longer to render on first attempt but it's much quicker. the same pages take 15 seconds on azure and 4 seconds on AWS. after initial template load, both environments load the content pages in less than a second.
Hi Simon
In traditional hosting what you have described is potentially your application pool "waking up" and getting the site up and running. This is symptomatic of sites with low traffic volumes.
However, I am not sure about Azure and how this aspect works.
It might be worth looking into the Azure configuration to see if you are able to prevent this from occurring.
Also an option is to use a ping service (https://www.site24x7.com/ping-test.html) which will prevent the site from going to sleep.
Hope this helps.
Nigel
hi Nigel, thanks for replying.
this behaviour isn't the initial app pool startup delay. this happens per template. so even after the initial app startup that you describe, each different template takes a long time to render the first time.
I have a similar issue, however the loading times aren't that bad and I'm having quite alot of traffic so the pool doesn't go to sleep = I don't notice it usually.
However, this has something to do with the compiling of the views - I haven't figured it out exactly yet though.
So if you find anything about this, I'm interested as well. Whenever I have time to review this issue, I'll keep you updated :)
thanks Alexander.
i think for now i will use a service like scivisum to keep all the pages warm (have it visit a page of each different type of template).
it's also worth considering using AWS over azure because the view compile time was much shorter on AWS.
for anybody who has this problem, the issue is completely down to view compilation.
i followed this guide to get precompiled views in umbraco and now everything is running super fast https://colours.nl/blog/road-to-precompiled-web-application-based-on-umbraco-cms
I'm interested to fix the same issue in Azure. The link seems to be not valid anymore. Where can I find more about your solution?
is working on a reply...