{"id":1402,"date":"2018-02-26T12:09:15","date_gmt":"2018-02-26T06:39:15","guid":{"rendered":"http:\/\/www.idslogic.com\/blog\/?p=1402"},"modified":"2025-02-24T17:47:17","modified_gmt":"2025-02-24T12:17:17","slug":"use-roslyn-to-boost-sitefinity-website-load-time","status":"publish","type":"post","link":"https:\/\/www.idslogic.com\/blog\/use-roslyn-to-boost-sitefinity-website-load-time","title":{"rendered":"Use Roslyn to Boost Sitefinity Website Load Time"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">The loading time of a website is one of the most important factors for its success as visitors don\u2019t love to wait for more than the usual time. If a site is slow in loading, they usually move to some other websites and that may be a competitor. <\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">Sitefinity is a leading CMS that comes with rich features and functionalities and the latest release boosts the startup performance phase of Sitefinity websites and also cuts the time to about half of it in many cases.<\/span><\/p>\n<hr \/>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #008000; font-size: 18pt;\">What Happens When a Website Starts?<\/span><\/strong><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">When an application starts for the first time, you may observe the \u201cplease wait a moment\u201d on the screen. Asp.net uses and therefore Sitefinity use a runtime compilation to compile the assets together and wherever there is a new page that is built or recycled, there is a longer wait time as the complier is at work.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">So, it is very important to understand ASP.net application startup flow, as this will help to measure the performance in details. Here is how the whole process is divided into three prime phases:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">The first phase includes the updation of the Temporary ASP.net Folder and it is executed after any deployment, rebuild or any other changes in the Bin folder of your project. It clears everything that exists in the Temporary ASP.Net Folder and then copies the new files there.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\"><a href=\"http:\/\/www.idslogic.com\/frequently-asked-questions-sitefinity\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1406 size-full\" src=\"https:\/\/www.idslogic.com\/blog\/wp-content\/uploads\/2018\/02\/faq-sitefinity1.jpg\" alt=\"faq-sitefinity1\" width=\"1024\" height=\"111\" srcset=\"https:\/\/www.idslogic.com\/blog\/wp-content\/uploads\/2018\/02\/faq-sitefinity1.jpg 1024w, https:\/\/www.idslogic.com\/blog\/wp-content\/uploads\/2018\/02\/faq-sitefinity1-300x33.jpg 300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">The second phase includes the Web Application initialization and that is divided into three sub-steps:<\/span><\/p>\n<ol>\n<li><span style=\"font-size: 14pt;\">The application start stage<\/span><\/li>\n<li><span style=\"font-size: 14pt;\">The Sitefinity startup stage<\/span><\/li>\n<li><span style=\"font-size: 14pt;\">Sitefinity bootstrap events<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">The last phase is the initial page load and this is when the first page request is sent which causes the application to start. In any case the page in not already compiled in the temporary ASP.Net Folder, it is compiled dynamically.<\/span><\/p>\n<hr \/>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #008000; font-size: 18pt;\">Roslyn the Rescuer:<\/span><\/strong><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">Roslyn is the Microsoft\u2019s new compiler and it is very fast than the default complier. It is at least 6 time faster and large sites have come down from 15 minutes to about 70 seconds. Roslyn works by creating some executable code fragments at runtime. <\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">With this complier, it is all in the memory and you don\u2019t need to mess with things that include assembly loading and file creation in case you are not interested in it. Roslyn compiles code files and then generate assemblies. it brings code analysis to a much higher level than ever before.<\/span><\/p>\n<hr \/>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #008000; font-size: 18pt;\">Optimizing the Website Startup: <\/span><\/strong><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">In order to optimize the startup time of your site, you can use Roslyn and it will help with improved startup and pre-compilation times. In the Sitefinity CMS, this can be done in two ways.<\/span><\/p>\n<ol style=\"text-align: justify;\">\n<li><span style=\"font-size: 14pt;\">While installing or upgrading Sitefinity CMS 10.2 through the NuGet package, the Roslyn compilers is automatically added and it is referred as a dependency.<\/span><\/li>\n<li><span style=\"font-size: 14pt;\">While working with the Sitefinity CMS Project manager, and creating or upgrading any new project, you have to manually install the package.<\/span><\/li>\n<\/ol>\n<hr \/>\n<p style=\"text-align: justify;\"><span style=\"font-size: 18pt;\"><strong><span style=\"color: #008000;\">How the page loading time can affect your bottom line?<\/span><\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">Speed plays a major role in making a website successful and decreasing page load time can often drastically increase the conversion. Since every second counts, loading time is a major contributing factor that causes page abandonment. <\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14pt;\">Slower page response time often results in visitors leaving the site and looking for some other sites. Not only this, Google also puts weight on factors such as speed topicality, relevance and etc.<\/span><\/p>\n<blockquote>\n<p style=\"box-shadow: 0 0 16px #cccccc; padding: 10px;\"><span style=\"font-size: 14pt;\"><strong><span style=\"color: #800000;\">Related Blog:<\/span>\u00a0<\/strong><a href=\"\/blog\/how-to-implement-roslyn-in-your-project\"><span style=\"color: #ff0000;\">How to Implement ROSLYN in Your Project\u00a0<\/span><\/a><\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>The loading time of a website is one of the most important factors for its success as visitors don\u2019t love to wait for more than the usual time. If a site is slow in loading, they usually move to some&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1405,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[256,251],"tags":[743,285,252,226,225],"class_list":["post-1402","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cms","category-sitefinity","tag-roslyn","tag-sitefinity-cms","tag-sitefinity-cms-development","tag-sitefinity-development","tag-sitefinity-website-development"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/posts\/1402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/comments?post=1402"}],"version-history":[{"count":8,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/posts\/1402\/revisions"}],"predecessor-version":[{"id":10638,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/posts\/1402\/revisions\/10638"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/media\/1405"}],"wp:attachment":[{"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/media?parent=1402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/categories?post=1402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/tags?post=1402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}