Skip and Take are Expression Constants in C# ToDataSourceResult

2 posts, 0 answers
  1. Rishi
    Rishi avatar
    6 posts
    Member since:
    Apr 2014

    Posted 07 Nov 2017 Link to this post

    We have discovered that the Skip and Take parameters that are used for paging, are treated as expression constants inside the Kendo.Mvc librabry.

    For this reason, each page will generate a slightly different query because these two numbers are IN the query versus begin a query parameter.

    Most DBMS systems who use optimized query plans, will not be able to re-use these plans for different pages, which is a performance waste.

    Here are some blogs also describing our issue:

    • https://anthonychu.ca/post/entity-framework-parameterize-skip-take-queries-sql/
    • https://visualstudiomagazine.com/articles/2016/12/06/skip-take-entity-framework-lambda.aspx

    I also attached a screenshot of the Skip and Take implementation of the Kendo.Mvc Queryable Extensions library.

    Our software is based on .NET 4.6 and we have no near-future plans to going to .NET Core.

    Is there a workaround for this performance issue?

  2. Stefan
    Admin
    Stefan avatar
    2491 posts

    Posted 09 Nov 2017 Link to this post

    Hello, Rishi,

    Thank you for the provided details and suggestions.

    I can suggest submitting a feature request in our feedback portal and based on its popularity we may implement it in a future release:

    http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback?category_id=46166

    Currently, there is no workaround as this will require changes to the C# code which cannot be easily overwritten.

    It can only be changed locally by manually changing our source code, but this is not recommended as it can lead to unexpected issues.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top