My previous impression is that Repeater is better than DataGrid, but I don't know if I don't know, I'm scared!
I used the pressure test software (ACT) that comes with VS to test the performance of the two, using the number of visits that can be supported per second as a measure of standards.
But the result is my expectation,
DataGrid is more efficient than Repeater!
Let me talk about my test method. Please see if there is any problem with my test method. If there is no problem, what is the reason for this imagination?
Hardware: CPU: AMD XP2000 , 80G hard drive, 512M memory.
Software: Windows 2003 SP1, VS2003, SQL Server 2000 SP4
Test data: Show a table (city table) data, 4 fields, and 349 records.
Test Purpose: The data is displayed in the page.
Only the function of displaying data is tested, regardless of other aspects.
Test Conditions:
1, whether the viewState is open
2, display 10 records, and display 349 records.
3, DataGrid, Repeater
In general, DataGrid is always more than REPEATER.
Especially in the case of turning off the viewState.
Often see some articles that Repeater is better than DataGrid performance, but what is my test results?
Test Result: Show 10 records, no viewState, DataTable binding control, DataGrid uses the binding column. 1, DataGrid: 250 rps around. 2, Repeater: <% # DataBinder.eval (Container, "DataItem.cityID")%> Method: 200 RPS. 3, Repeater: <% # (DATAROWVIEW) Container.DataItem) ["CityID"]%> Method: 250 rps a little bit. 4, Repeater: <% # (DATAROWVIEW) Container.DataItem) [0]%> Method: 250 rps A little bit. Where 3, 4 is a method of binding data I just found. It seems that <% # DataBinder.eval (Container, "DataItem.cityID")%> This binding method is too low. I have been using this way, what about you? Multi-data tests Display 349 records in a page, no viewState, DataTable binding control, DataGrid uses the binding column. 1, DataGrid: 50 to 60 RPS beat. 2, Repeater: <% # DataBinder.eval (Container, "DataItem.cityID")%> Method: 20 rps left and right. 3, Repeater: <% # ((DATAROWVIEW) Container.DataItem) ["CityID"]%> method: 88 rps left and right. 4, Repeater: <% # ((DATAROWVIEW) Container.DataItem) [0]%> Method: 90 rps left and right.