locked
Performance on using PagedList RRS feed

  • Question

  • Dear All

    Thank you for your attention.

    I would like to use PagedList.Mvc package with Entity Framework 

    My data record pool will be larger than 1000000,

    will the performance very slow?

    and is the following way the best for paging? thanks

     IPagedList<summary> summaries = context.Summaries.OrderByDescending(m => m.createDate).ToPagedList(2, 5);




    Best Regards
    mintssoul



    • Edited by mintssoul Thursday, May 7, 2015 9:17 AM
    Thursday, May 7, 2015 9:16 AM

Answers

  • Hello mintssoul,

    >>and is the following way the best for paging?

    As far as I know, Entity Framework itself has the page function by using Take() and Skip() methods:

    https://msdn.microsoft.com/en-us/magazine/gg650669.aspx

    You could check the link above and for the performance of Entity Framework query, you could do some preparation to improve it, for details, please refer to this link:

    https://msdn.microsoft.com/en-us/data/hh949853.aspx

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by mintssoul Friday, May 8, 2015 6:34 AM
    Friday, May 8, 2015 2:46 AM

All replies

  • My data record pool will be larger than 1000000,

    will the performance very slow?

    Any time you go back and hit the database in a paging scenario to provide the source with this amount of data you are talking about, it's going to take some time. You may want to look into a segment of data and not all of it at one shot.

    You should be posting to the MVC section about this.

    http://forums.asp.net/

    Thursday, May 7, 2015 4:51 PM
  • Hello mintssoul,

    >>and is the following way the best for paging?

    As far as I know, Entity Framework itself has the page function by using Take() and Skip() methods:

    https://msdn.microsoft.com/en-us/magazine/gg650669.aspx

    You could check the link above and for the performance of Entity Framework query, you could do some preparation to improve it, for details, please refer to this link:

    https://msdn.microsoft.com/en-us/data/hh949853.aspx

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by mintssoul Friday, May 8, 2015 6:34 AM
    Friday, May 8, 2015 2:46 AM