How do I reduce the Page Size using GridView RRS feed

  • Question

  • User197122282 posted

    I am maintaining a large ASP.NET 4.0 and ADO.NET application written by another developer. The application has many pages with GridView and the performance is painfully slow. The pages make use of pagination but user can view complete data (upto 10k records) at a time. The ADO.NET queries are efficient enough and return the data in less than a millisecond. I have tried many options including:

    1. Reducing the amount of data returned and using trimmed-down DTOs
    2. Turning off the gridview state
    3. Removing MasterPage (for testing purpose)

     However, the performance has not improved much. The HTML rendering of the pages is very slow due to large page size (around 10-12 MB). Following is a sample code used for data binding:

    private void Bind (int param, int param)
        IColletion<CarDTO> list;
        list= new CarBLL().Get_Car_List (param1, param2); // data return in ms
        if (list.count > 0)
            grid.DataSource = list;

    Can some one help me in this regard. Thanks in advance.

    Friday, September 13, 2019 12:43 PM

All replies

  • User475983607 posted

    User's cannot comprehend or work with 10k records on the computer screen.  The logical solution is to limit the records.  Rather than fetching all records only fetch one page at a time.  Perhaps cache the each page that's request to speed up fetching pages that have already been read.

    Friday, September 13, 2019 12:56 PM
  • User409696431 posted

    Limit the amount of data users can see.  A web page was never supposed to render thousands of lines.  Users can't possibly view/scan 10K lines, either.  Give them a way to filter/search the data, and only fetch and download the results of the filter/search from the server; don't download everything and then filter/search.

    Friday, September 13, 2019 2:26 PM