Click here to Skip to main content
15,887,392 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 30,000 record in my one table, and i want to show all record in grid view.
I write a traditional code for this to bind grid view i.e.
gvlist.DataSource =ds;
gvlist.DataBind();

all data i am fetching and storing in ds and i supply this DS to my grid view,but it is taking to much time to load page around 3-4 mins.

So any suggesstions to minimise page load time.
Posted

You need to use paging for this one. Read more about paging in gridview. There are a lot of articles if you use google.

And then, after you get used to the concept, you might want to try this one.[^]
 
Share this answer
 
What you are doing is not at all recommended. When the number of users will increase, your website may start giving OutOfMemory exceptions and many users will experience time-outs.

Use GridView paging[^] to display only certain number of records on a page. The user can page through the records. You may also extend the features and add search facility for the records.

Again, there are certain performance considerations when you are getting so many records from database and using paging. You have two important things to consider:
a) memory usage on the server - DataTables will take a lot of memory if huge records are fetched at a time.
b) database hits - more the no. of hits, more time it takes to process the page.

You will have to optimize your web page to use best combination of both the techniques display so many records.

You may also search Google/Bing for displaying large records in Gridview and performance considerations.

Hope this gives you a start. ! :thumbsup:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900