Performance Issues loading large data set into c# GridView

后端 未结 5 2026
臣服心动
臣服心动 2021-01-06 09:09

Ok,

been testing relatively small data sets into my GridView, and all has worked fine. However, i\'ve now moved into proper UAT and have tried to load 17,000 records

5条回答
  •  无人及你
    2021-01-06 10:04

    You need to institute database paging.

    This will involve creating custom sorting, custom filtering, and custom paging, but it will dramatically increase the performance of your code, as you'll be retrieving only a pages-worth of data at a time from the DB, instead of all 17,000 rows at a time.

    I implemented this in a banking application that was designed to show, sort, and filter hundreds of thousands of loans. The answer is too complicated to give a simple example for, but start by researching database paging. Use LINQ, it'll give you simple Take and Skip methods to implement the paging easiest.

提交回复
热议问题