Sitefinity Development - Speed and Performance

Spread the love

How do you do mates? It’s a good fine day to talk about how to improve the development of creating Sitefinity Content Management System sites. But now there is a lot of talk about the performance improvements and checks for both development and production. Maybe some of the tricks and techniques may not work for people but can be taken into consideration while improving production or development. I would be very much appreciated in anyone let me know if there are others that are helpful.

First and the foremost thing to do is to update the latest version of Sitefinity. The application initialization and performance of the latest version is superior to the older one. It is wise to update to the latest one and rather to work on with the older version to get into the cycle of errors.

But the truth is that the Sitefinity Content Management System is built upon ASP.NET and some of the performance issues lie with ASP.NET rather than Sitefinity itself. But as everyone knows Sitefinity is a large application with over 120 binary files in the bin directory and 100’s of configuration setting that needs to be loaded whenever the application is started

Let’s see into some of the areas where we can improve for “Sitefinity Development”

System Hardware

To improve the development experience, it is recommended to have better and faster hardware. It is vital to make sure o run on an SSD drive, to have some fast memory modules, (DDR3/DDR4) and a top-line multi-core processor (Intel i7 processor).

Anti-Virus

There are few anti-virus programs that slow down the process of the development of an application. When a file is changed, added or removed, the anti-virus makes sure to scan it to check if it is a virus or not (It often happens and every developer knows it). It is best to remove Anti-Virus scanning on the local source control folder and the ASP.NET Temporary files folder.

Disable Inline Editing

Often in the developing process, the programmer looks at the site as an admin account. If there is inline editing enabled, then the resources required for this need to load. Go to Setting–> Advanced–> Pages–> Enable in-line editing and set it to false.

Global.ascx

When a global.ascx is being added to a project, often the default method is also left empty even though it is not being used. When an application runs, IIS checks if these methods exist and if they do then it is added to the processing pipeline and which results in another extra process in the processing. There is another issue that an empty method can throw an application error when dealing with CDN resources. So it is for the best to remove it or if possible combine functions to reduce the extra method loading.

Also consider using Request Start and End Methods which fire for every request, including a request for images and static files. It will also save a lot of pointless processing if these codes are to be moved to a better place.

Remove Unused Config and Sitefinity Modules

Sitefinity Content Management System does a great job of providing a list of modules that can be removed. But, if a site which was created on an earlier version of Sitefinity then things may have changed. It is compulsory to check the current web.config modules and other settings against the web.config generated by a new installation of Sitefinity to ensure not to load any obsolete modules. If the Sharepoint or Marketo integrators are not in use, then uninstall them from the site. Have a look into the other modules which are not in use and remove them. This will help improve startup times.

Filter Queries by View Permission

The default setting was true at the first release of Sitefinity. But the downside to this is that it caused a lot of performance problems. The need to check all permission was too heavy and was turned off. If an older version of Sitefinity is used, then it should be disabled.

Browser Link is False

Browser features have some amazing features but it does not go with Sitefinity’s JavaScript rather it clashes with it and throw errors. Set it to false and save yourself a lot of issues.

runAllManagedModulesForAllRequests

In the web.config file, we can find the attribute runAllManagedModulesForAllRequests o the element. It shouldn’t change it as a lot non ASP.NET needs to run through these modules. But if we have all file-based static resources in a particular folder then we can add a web.config file to this folder and set it to false. This will save us from a lot of overhead.

And Just for Completeness

Make sure of debug=”true” is only present in development. Never set it to true in production.

Don’t build excess projects

If you’re in the middle of development you probably do not need to be compiling excess projects that have little to do with what you are working on. Use the Configuration Manager and create different build profiles to help speed up the build time by avoiding projects that are not currently being required.

Remove Extra View Engine Look-ups

By default, the Web Form and Razor Views Engines are loaded and 28 locations are searched. You can reduce this lookup by removing the WebForms View Engine and the .vbhtml file lookups.

Feather Development

If there is the use of a class library for Feather widgets, a programmer can also embed their Views there too. But this means recompiling and restarting the application every time to make an HTML syntax change. To help speed up the process, place the Views in the Resource Packages folder first.

Dynamic Compression Before Cache

By default, Sitefinity has this attribute on the element set to false. But setting it to true is considered a better approach.

But why is it set to false to start with? Setting it to true can cause errors when the response is modified on its return. The ASP.NET Web Forms Cache Substitution causes such an error. The Sitefinity (Web Forms) Login Status widget uses cache substitution and will throw an error if this attribute is set to true. If you are not using this widget and not using Cache Substitution in your code, then set this value to true for better performance.

Application Errors

Any errors thrown in an application are resource-heavy, blocking events. They cause performance issues. There will always be some errors thrown but make sure to ensure there is nothing in the application. If there are, investigate and fix them. If it is not the code but Sitefinity’s, then log a fault.

Response.Redirect()

A common practice for developers is to use the Response. Redirect method to push requests to other pages and there is nothing wrong with that. But the most common approach is to use Response.Redirect(URL). The issue here is that this causes the page life cycle to abort its thread and this causes an application error. It’s all hidden and handled by ASP.NET but there is a better, safer, cleaner and more performant option.

Page.Response.Redirect(url, false);
HttpContext.Current.ApplicationInstance.CompleteRequest();
Page.Visible = false;

With this code, we are allowing the page life cycle and the thread to complete and end in a safe manner, without throwing a hidden application error.

Cache profiles

In each cache profile, there are three Boolean options. Two of them, Vary by User Agent and Vary by Host both determine if a different version of the page should be cached for different browser versions and host headers. The user agent string is often changed depending on the operating system it is on so it can almost get a one user, one cached page scenario. Not very efficient.

The third is Wait for page Output cache to fill. What happens here is that if a page is accessed by 10 requests at the same time and there is no cached version of the page then the first request will process the page and put it in the cache while the other nine requests wait until they can access it from the cache. The alternative is that all 10 requests run and process the page causing more resource overhead (it’s a better option).

Reindex Your Database

The database can become fragmented over time and this will slow overall performance. Look to rebuild the indexes on a regular basis.

Performance Tips from Sitefinity

You should ensure you have read the suggestions from Sitefinity.

SVG Images

SVG files are effectively a mark-up language and the advantage of it is that they scale, unlike traditional images. Really good for icon files.

Site Warmup

Site Warmup module effectively looks at all the pages and goes through rendering and placing them in the output cache. No need for that first user request. By default, it is off, just needs to be enabled.

Why Doesn’t Sitefinity Content Management System do all this Stuff by Default?

It would be great if the Sitefinity team just implemented all these improvements but the issue for them will always come down to backward compatibility. The last thing they want is for people to update their site with the latest release and it doesn’t work because people have coded against a previous implementation. This will only generate a lot of support tickets and grumpy posts. It has often happened with the older Sitefinity projects. So, it is best to re-code and take advantage of the Sitefinity’s features.

What programmers would like to see more of from the Sitefinity team these days is a table of features and functionality that is due to be decommissioned. The less old technology that Sitefinity has to support and test the faster they can then push out improvements.

A small suggestion to Company owners that they must encourage themselves to have a budget for maintenance which includes upgrades for both Sitefinity releases and code.

We have some of the best Sitefinity developers in India, if you need more information on Sitefinity CMS Development or performance improvement initiatives on existing Sitefinity portals, do reach out to us on – info@oditeksolutions.com

What OdiTek offers

Certified Developers

Deep Industry Expertise

IP Rights Agreement -Source Codes to Customers, legal compliance

NDA – Legally binding non-disclosure terms

Compliance to Software Development Quality Standards

Product Development Excellence

Dedicated Project Manager (Not billed)

Proactive Tech Support-Round the Clock

Commitment to Schedule

High performance, Secure software design

Guranteed Cost Savings & Value Addition

Consistent Achiever of Customer Happiness

Refer our Skills page:

Sitefinity

Sitefinity Progress CMS is a competent CMS platform developed in .Net and is considered one of the major content management systems available in the world today. It is one of the highly trusted CMSes and is often praised for its note-worthy qualities such as flexibility,...

Read More

Client Testimonials

If you need additional information or have project requirements, kindly drop an email to: info@oditeksolutions.com

Latest Insights

Enhancing Productivity with Kronos Time and Attendance System

The Kronos time and attendance system is designed to help organizations manage employee work hours, track attendance, and ensure compliance with labor laws. This system...

Finding the perfect fit: Exploring top alternatives for Crystal Reports

Crystal Reports has been a popular choice for creating BI reports for many years. Because of its advanced features like data connectivity, formatting & style...

Harnessing the Potential of Kronos Payroll Systems

Kronos payroll systems are part of the comprehensive suite of workforce management solutions offered by Kronos. These systems are designed to handle various payroll functions,...

From costs to customization: Jasper Report vs Crystal Report

In the digitization and data visualization era, choosing the right reporting tool can significantly impact efficiency and decision-making. Today, we delve into the age-old debate:...

× How can I help you?