Kentico project Build too slow

Nicky Nguyen asked on November 5, 2014 17:00

Hi everybody,

I'm new with Kentico, just installed and play with it for 10 days. I got trouble with building kentico project after developing a webpart, it takes me 15-20 minutes to build & register webpart. Each time I want to update source code I have to click on BUILD again and it still takes me 15-20 minutes.

I'm not sure if you run across this issue. Could you give me a suggestion about this? or I did something wrong?

Thanks, Nich

Recent Answers

Virgil Carroll answered on November 5, 2014 17:56

Brian McKeiver just did a blog post on this. Should point you in a good direction: link text

0 votesVote for this answer Mark as a Correct answer

Nicky Nguyen answered on November 5, 2014 18:17

Hi Virgil, that post only instruct how to speed up DEBUGGING. Seem that it just skip BUILD step and run right away. Once we make change with the code we'll need to build again.

Could you tell me how long you spend on building project when you have change on it?

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on November 5, 2014 18:27

First are you running the WebApp or Website version? If you are using the App_Code folder then you should not have to rebuild at all until the final. You should be able to just edit your code and run just-in-time compilation through the browser. If you are using the all .DLL version with the Lib project, you can use the CMSApp_AppCode project, put your code there and do the same.

The one thing you could do to speed up performance of the build is to build only the project you are working on vs. building the entire solution each time. I am assuming you are using the Web Site version which all code is stored in the App_Code folder. If so, you really do not need to do a build at all.

0 votesVote for this answer Mark as a Correct answer

Nicky Nguyen answered on November 5, 2014 18:47

Hi Virgil, I really appreciate your help.

Currently I'm using website version. Could you tell me which one should be recommended to use popularly? Is there any difference approach in development with them?

I watched Kentico tutorial video and they did create website under CMSWebparts folder, that is reason I need to build entire "CMS" project. I haven't imagined how we separate code to be easy in coding like creating new project then deploy ...

Or Kentico instructed wrong structure of coding placement when development?

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on November 5, 2014 19:00

No Kentico's instructions are not incorrect, but when you are doing code this way, as long as you save the code file in Visual Studio you can just go to the browser, refresh and see how your new code runs. It does not require a build through VS.

If you want to debug at that point, then you can just Attach to Process and debug that way.

I tend to use the Web App because of the faster build, plus I have multiple versions running on my system so if I want to look at the code behind in a Web Site version, I can easily do so by looking at another running instance.

Even with the Web App version it still needs to re-compile to see your changes, but all the standard Kentico classes are pre-compiled which speeds up the build process dramatically.

Sorry I cannot be of more help.

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on November 6, 2014 03:03

To add to your comments already, I choose the opposite of Virgil because it provides the client with a full Kentico user experience. You can import webparts, add other user controls, templates, transformations without needing to recompile. Yes the initial load of the object you're accessing takes a bit longer but it's a short amount of time. It also offers easier code updates without the need to redeploy the whole site.

If you don't modify any code in the App_Code directory or add any web services, your build time after the initial one should be minimal. Adding webparts should be minimal changes and have immediate use or the changed or added code. As Brian McKeiver mentions in his post, there are a lot of dependencies and it is a large project so expect the build time to take a while.

Just my opinion, good luck!

2 votesVote for this answer Mark as a Correct answer

Charles Matvchuk answered on November 7, 2014 03:43

Again I will concur with Brenden, we use the web site model. If you look at the differences the precompiled web app model takes away some possible functionality that you might be using. We do it one of two ways. We use Visual Studio 2013 (by the way the spin up time on Visual Studio 2014 CTP 3 is much quicker) which doesn't use Cassini (VS built in development web server - this died out in the previous version) so it uses IIS Express, we set our machines so that there is proper RAM allocated and we develop but leave a browser open with the site running. This way it is a just a refresh of the browser screen and a few seconds. We tend to go through and hit every page and our modules we will be working with so it precompiles those pages first, makes for a good experience. The second way we do it is by running the site under IIS Full Version on our machines and opening the project in visual studio for development. Actually, technically you can set Visual Studio 2013 to use full IIS instead of express. We set IIS for persistence, etc. Now if you really want to be cool about it, you can set up a ping to hit the local IIS Running Website every few minutes and this will keep the site compiled.

Just some Ideas.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.