I have a large amount of student's exam data which I process to display student results. Although it seems to work but it takes significantly longer time to display result. The time is increasing every passing day.
- I have a question table (tblQuestions) to store questions and correct answer.
- I have a Test Instance table (tblTestInstance) which stores test instance for each test given by student.
- The largest table I have is tblTestDetails which stores question IDs and option selected by student.
I bind GridView with student table and on GridView's Databound event, for each student I calculate correct answer for each question attempted by student. I calculate data inside a data table.
Problem is: It takes several minutes to process result.
Required Suggestion: I want to bind gridview, row by row (each row once the single result is ready) instead of loading all calculated results at once.
What I've tried: I have used Update Panel, with timer control. On interval of few seconds I tried reloading my datatable, but it still displays result all together.
Any suggestion please. I am using ASP.NET Web Forms.
Edit: I want to display result row by row. I mean when the first row is ready it should display to user's screen. This would not improve the performance I know but I want the user to see something on screen rather than waiting for all rows to be ready.
For example if a class has 1000 students and they have performed a test with 150 or more questions each, then evaluating answers takes longer time.
The approach I am using currently I pull students from database, and bind the grid view For each student I pull the test instance and then question set For each question I evaluate answers using question's table After I calculate marks, I display them.