Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 6.x > Installation and deployment > Kentico 6 is slower than ever View modes: 
User avatar
Member
Member
ovidiu.lazar-evozon - 11/3/2011 7:45:21 AM
   
Kentico 6 is slower than ever
Hi guys,

So I've been doing Kentico projects for almost a year now. Kentico 5.5R2 has always been slow for me but it seems that 6 is even slower.

Today I've decided to take action on this and ask you guys for advice. When I navigate between pages and even when I'm expanding a node with 3-4 children, it can take up to a minute for the page to load.

This is a fresh installation of Kentico 6 with less than 50 documents and folders. I'm using aspx templates, Visual Studio 2010 with built-in IIS and Windows 7.

VS is ok because my non-kentico sites have always worked great. The DB is also fast.

Any tips or tweaks that you can share to make Kentico go faster?

Thanks,

Ovidiu

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/6/2011 4:28:20 AM
   
RE:Kentico 6 is slower than ever
Hi,

Are you talking about the page load in the user interface of CMS Desk or live site?
What you mean by "Visual Studio 2010 with built-in IIS"? Do you mean the built in VS web server? This server is not very good in performance and it should be used for debugging/development only. Have you tried the standard IIS server?

You can also use one of the debugging options to see which queries are called, how long does it take to execute them and also you can use the threads debug etc.

I hope it will help.

Best regards,
Juraj Ondrus

User avatar
Member
Member
lhuffey - 11/7/2011 6:38:36 AM
   
RE:Kentico 6 is slower than ever
Hi Ovidiu,

I have certainly found Kentico to run slow under the Built In Visual Studio Web Server, this is more down to the hooks etc VS adds for debugging purposes than a issue with Kentico itself.

The way I tend to develop Kentico projects now is to set it up under IIS on a certain port number and then change the VS project settings to use and bind itself to the IIS process, this has proven very fast even with very large projects (100,000+ pages).

I'm sure you will know the required steps already but if you get stuck feel free to post again and i'll do a step by step for you :-)

Best Wishes,
Luke

User avatar
Member
Member
Snarrak - 11/14/2011 7:34:59 AM
   
RE:Kentico 6 is slower than ever
You can also try the visual studio tool 'Profiler'.

After profiling, it generates a report for you, with things like the most expensive methods.

http://msdn.microsoft.com/en-us/library/ms182372.aspx

User avatar
Member
Member
ovidiu-e-cubed - 12/5/2011 6:25:54 AM
   
RE:Kentico 6 is slower than ever
Thanks,

Well Kentico has a lot of pages, this means everything is slower. For instance, searching in the entire solution is very very slow, because it's searching everywhere, including some .export files.


One thing I noticed in Kentico 6 is that it has a lot more files in the solution than 5.5. Congrats for that.

Question: have you guys thought of a model where you separate most of the code login in assemblies? I know you have plenty of them but there's a lot of code in the web parts as well.

For instance, let's take the search control. It has a really big Search method which could be separated in an assembly. You should allow for lots of overloads, of course (for flexibility) and this would reduce the VS solution, and allow for faster loading.

I know you guys have your own architecture figured out - it's just a suggestion.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 12/7/2011 2:22:38 AM
   
RE:Kentico 6 is slower than ever
Hi,

You post is more about the Visual studio performance. This also depends on the machine hardware :-)

However, there are many plugins for Visual studio like Dpack which seems to be very useful and our developers are using it.

Regarding the assemblies - I got your point but also need to keep on mind the customizable point of view when someone wants to change something - they do not need to purchase source code license. I partially agree with you and we need to find kind of balance here to fulfill the needs of most of our customers.

Best regards,
Juraj Ondrus

User avatar
Member
Member
ovidiu-e-cubed - 12/7/2011 8:57:41 AM
   
RE:Kentico 6 is slower than ever
Intel core 2 quad CPU @ 2,5Ghz with 4GB of ram :)

Debugger or no debugger, it shouldn't take more than 5 seconds to load a page, especially since I'm working on localhost and, thus, not relying on my Internet connection to fetch any assets.

Good luck finding that balance!

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 12/8/2011 1:48:05 AM
   
RE:Kentico 6 is slower than ever
Hi,

I am sorry but I am confused what you mean - I thought you were talking about the Visual Studio and so on not about the page load of the actual web site.

In this case - when using the Visual studio server - this will take some time since this server is slower than IIS and I agree, some impact on this has also the amount of the files that has to be compiled. However, you can also set the VS to use the IIS server. This is up to you.

Best regards,
Juraj Ondrus

User avatar
Member
Member
ovidiu-e-cubed - 12/8/2011 9:33:47 AM
   
RE:Kentico 6 is slower than ever
Hi,
Well, the page load is sometimes the problem, and this happens even if I'm not attached to a debugger.

BTW, I found this method: public MediaFileInfo SaveNewFile(FileInfo fi, string title, string description, string name, string filePath)

in 2 controls: MediaFileEdit.aspx.cs and MediaLibrary.aspx.cs

It's almost the same - I'm sure you could refactor it ;)

Thanks,
Ovidiu

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 12/9/2011 1:16:12 AM
   
RE:Kentico 6 is slower than ever
Hi,

Your information is always so brief - I do not know what and where are you doing in the API, what are you customizing and so on.

So, my answer will be general - have you seen the blog posts from our CTO and also from the solution architect about optimizing your code, pages, settings, etc.? There are many tips and tricks how to do things better. Also, one of the Kentico certified developers is writing a nice blog post - Jeroen Furst.

I hope it will help.

Best regards,
Juraj Ondrus

User avatar
Member
Member
ovidiu-e-cubed - 12/12/2011 8:07:17 AM
   
RE:Kentico 6 is slower than ever
Hi Juraj,

Thanks for the resources - great reads.

I wish I could narrow it down because it seems that all pages stop responding when they do. When they start working, all of them start working at the same time.

For example, If I'm trying to access the cms desk and I get a loading page, if I try to access the main site, both pages are waiting to load (and i get a loading message).

If I wait (30-60 seconds), both pages start loading all of the sudden (at the same time).

My best guess is that the SQL connection is waiting for something and that all my requests are queued up. Once the bottleneck is solved, both my requests are quickly resolved too.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 12/19/2011 1:30:01 AM
   
RE:Kentico 6 is slower than ever
Hi,

Could you please check the Site Manager -> Administration -> Event log if there are any exceptions logged or application restarts?
Also, you can use the SQL queries debug to see which queries are executed and how long do they take.

Also, what is the connection to the SQL server? Are there any firewalls on the way?

Best regards,
Juraj Ondrus

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 1/3/2012 2:24:40 PM
   
RE:Kentico 6 is slower than ever
Remember that Kentico has to rebuild every time you run in debug mode or change something in App_Code. Aspx and Ascx files with code behind also need to be compiled into classes stored in the ASP.NET Temp folder. Those files are not compiled until requested by the application. Because of this, as you navigate around the CMS, the pages and controls that are being requested are being built for the first time since the application restarted. This will result in a very slow response time until all of the pages and user controls being used on the pages you are navigating to are compiled. Once they have been compiled, you will notice much faster response times when you navigate around, that is until you encounter another control that has yet to be compiled.

It is not a SQL bottleneck, it is the nature of ASP.NET 2.0+ and the luxury of as-needed compilation.

If you've ever worked with ASP.NET 1.1, you would know that your entire solution had to be compiled in order for it to work.

I hope this was informative.