Click here to Skip to main content
15,896,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

i have one page where i have created custom tables based on some different data from the database. query execution time is not issue, query returns more then 5000 records in 0 seconds, now based on different condition we are generating three tables using for loop to display these records on page. i am using devexpress xtrareport tool where i bind data by creating rows from for loop and this is taking forever time and at the end we got error request time out.
Posted
Comments
Faisalabadians 20-May-14 8:52am    
why you creating rows inside for loop? what are the requirements?
ravikhoda 20-May-14 8:55am    
well on this page i can not use any controls like grid or repeater on the page. i need to use table object to manually show data on the page.
Faisalabadians 20-May-14 9:00am    
why you don't ask from database for that data which you need to show? the amount you are telling is a high amount and if you are performing other activities along with separating rows inside for loop will definitely cause to request time out which is the feature of some time modern browsers and some time IIS configuration.

last thing I would suggest you to use LINQ to dataset to filter rows instead of applying for loop.

1 solution

The web is not designed for displaying large datasets. You have to ask the question how useful is a list of 5000 records?

Personally I'd take another look at the problem and look for a more lateral solution such as adding search or pagination features.

But that said, if you're unsure where the delay is then you need to profile your code.

VS premium and ultimate both include profiling tools which will highlight the problem areas in your code.

If you don't have these editions try AntsProfiler from RedGate. There's a free trial. But please buy it if you like it.
 
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