Problem running sample project with Kendo in release mode

4 posts, 0 answers
  1. Piotr
    Piotr avatar
    9 posts
    Member since:
    Oct 2011

    Posted 05 Sep 2012 Link to this post

    Dear Kendo Team,
    I have a problem in running mvc 4 app which uses kendo in the release mode (debug="false"). I started a sample application, went through the getting started guide. Everything seems to work until I change compilation debug="false" node in web.config.
    I attach the sample app. Could you please take a look at the code and tell me what is wrong with it?
    Cheers!
    Piotrek
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 07 Sep 2012 Link to this post

    Hello Piotr,

    The problem is caused by misconfigured ASP.NET MVC bundling (which gets enabled when you go out of debug mode. If you configure the kendo styles bundle to the virtual path ~/Content/kendo/bundle (rather than the existing ~/Content/kendo directory), the problem perishes. I'm attaching the modified sample project.

    All the best,
    Alex Gyoshev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Piotr
    Piotr avatar
    9 posts
    Member since:
    Oct 2011

    Posted 13 Sep 2012 Link to this post

    Hello Alex,
    I think there is a problem with the code you sent me (I was able to reproduce this behavour in my other app, but let's stick to the example presented in this thread). When I run it, it takes about 6 seconds on my machine to get a single page. Those pages are static, no data access, no fireworks - it's taking too long. I did an investigation and apparently something is wrong with Kendo scripts bundling (please see steps to reproduce below). Have you spotted that? Why does it happen only for Kendo scripts and not for Kendo styles?
    For now it seems to me that bundling of kendo scripts has to be turned of because of its influence on performance.
    Kind regards
    Piotrek

    Steps to reproduce
    1. Take the application from your previous post
    2. Run it and measure time (I do it in firebug) while navigating through the page. It takes about 6 seconds to load each page
    3. Now go to _Layout.cshtml file and remove line:
    @Scripts.Render("~/bundles/kendo")
    4. Add two lines instead
    <script type="text/javascript" src="~/Scripts/Kendo/kendo.web.min.js"></script>
    <script type="text/javascript" src="~/Scripts/Kendo/kendo.aspnetmvc.min.js"></script>
    5. Run the application and navigate between pages. It will take about 100 miliseconds to load each page!
  4. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 18 Sep 2012 Link to this post

    Hello Piotr,

    This appears to be a issue in the bundling itself. From what I gathered, the release candidate for MVC4 has had this problem. In any case, using the scripts from the official CDN might be faster than the bundling, if appropriate in your specific scenario.

    Greetings,
    Alex Gyoshev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top