Performance Tips: make your Kentico app lighting fast

SHARE

 
There are many nice articles about web site performance optimization accross the Internet. As long as this is really important topic, I think there can't be too many of them. That's why I'd like to share some suggestions on how to make Kentico run faster.

 


Generic 

 
Scheduled Tasks: turn off any unnecessary scheduled tasks; make sure all enabled tasks are running with meaningful frequency

Output Filters: output filters goes through rendered page markup and fix some elements within it. If you feel confident about quality of your HTML you are good to turn them off. Keep in mind there might be a lot of markup added by content editors through editable text web part

Caching: Kentico provides us with great caching capabilities out of the box - do not hesitate to use it! Data caching is a key to a good performance. Kentico allows us to cache almost everything and almost everywhere. With cache dependencies we can easily specify when system should update cached data. We can cache data retrieved with data source web parts, viewers, macro, page data and any data we read from database in custom code. It is extremely useful with custom transformation methods 

Macro: make sure all macros are signed with valid signature

Event Log: check event log for any errors in it and resolve if any

Debug: make sure debug is disabled in production. It could be enabled only in case you need to troubleshoot some issue and should be disabled immediately after completion 

Continuous Integration: CI is developer’s tool to synchronize their working environments. It should never be used to transfer changes from QA to production, which means it should never be enabled in production

CSS: put all you styles into (one) Kentico stylesheet. Try to avoid adding CSS into transformation, web part containers, etc.

JavaScript: do not place too many web parts with inline javascript. You should better place your code in js file and reference it, so you may substitute many inline javascripts with one file
Resources compression: allow resources compression and minification of JS and CSS. This will increase processing for the first request, but speed all furthers ones 

CMS Tree: keep your CMS Tree organized and well structured, avoid placing 100500 pages under the same parent, use a couple of levels instead. In addition to performance benefits you get, this will allow content editors to navigate easier  

 

Template 

Web part IDs: do not populate/use web part name, you can always specify some meaningful ID for web part, which will help you to identify the responsibilities of the actual web part

Content before/after: Kentico provides us with web part containers, which is very convenient way to wrap web part with some markup. Unfortunately, is not efficient, as it adds extra loading and processing. Content before/after is much more efficient, as it loads along with other properties of the web part, however it is not convenient as it requires knowledge of HTML

Check permissions: make sure this property of the web part is set to false in case of public content. This also could be setup on the global level in Settings in case of publicly available web site

Columns: make sure you're loading only data you need. If you leave this property of a web part blank, Kentico will load all available column. In some cases, number of column could be around 200. Usually we need 5-20 columns on page

 

Data storage 

Files: store files in file system - it is much faster to load them from there. Also you do not overwhelm your database with gigabytes of files

Media: store all media files into Media Library instead of CMS Tree

Data: often we choose custom page type as best fit to store some data and/or content. Unfortunately, page types are not efficient performance wise. Kentico stores pages’ data into three different database tables and has a lot of processing around it. There are many benefits and features available for page types, those are not available for other objects: workflow, security, localization, same page type stored it in different locations, etc. But there are situations, when we do not need any of those features. In those cases, I'd recommend you to consider Custom Tables or Custom Modules. With any of those two you can easily provide content editors with nice interface to manage those objects. This also help you to prevent enormous amount of pages.

 

Conclusion

There are many other things you could do in order to increase performance of your application: placing javascript files references at the end of your page, using CDN, optimizing of your images, combining javascript and css into a single file, loading data with AJAx, emilimination of the errors in the markup and javascript, etc., but all they are out of Kentico topic, however also very important.
Tips I've mentioned here are not requirement and might not be even possible in some cases, but be sure to consider them.
 

Author

Check other articles

Contact us

Bitsorchestra
5 5

What our clients say

Bits Orchestra team are outstanding developers​. They listen carefully to our business needs and easily turns our business objectives into a well thought out and executed development effort. Roman is very bright and definitely the most capable developer that has worked on our site. He is not only a Kentico expert but has successfully tackled other complicated development assignments demonstrating expertise in both front and backend development. Roman takes initiative to suggest enhancements that make site maintenance easier while improving the customer experience. The team is very responsive to our work requests and has great follow up. They have also worked very business partners and this has reflected positively on our company. Roman is a true partner for us and a tremendous asset to our organization. We will continue to work with them and would highly recommend Roman and his team for your development needs. He and his team will exceed your expectations!
 Alan Lehmann
Alan Lehmann
President at In energy sector

What our clients say

The Bits Orchestra team does excellent work. They are always available and I appreciate our frequent calls and screen-shares together. Their dedication to the projects and knowledge of Kentico is outstanding. They truly care about the quality of their work, and became a part of our team easily!
Shena Lowe
Shena Lowe
Managing Partner at Consensus Interactive

What our clients say

We hired Roman for a Kentico analysis project and have been very satisfied. He is very skilled and professional. We are looking to hire him and his team again on future projects.
Sylvain Audet
Sylvain Audet
CEO at MyDevPartner.com

What our clients say

Roman and team have taken over an existing Kentico EMS site for a large US Oil Company. So far, they have handled every single request that we have thrown at them and these were diverse, challenging, often bespoke, usually urgent and almost daily, over the last 11 months. Their work is of an extremely high quality, they are capable, quick and we have great confidence in the support that we are getting.
Jon Hollis
Jon Hollis
Head of Web Development at confidential

What our clients say

Bits Orchestra team was very helpful, they had a good understanding of the brief and deep knowledge of the system. They were always keen to provide advice and recommendations that benefit the project substantially.
Ramon Lapenta
Ramon Lapenta
Senior Front End Developer at Cyber-Duck Ltd