View Single Post
  #1 (permalink)  
Old April 5th, 2006, 04:43 PM
wirerider wirerider is offline
Authorized User
Points: 514, Level: 8
Points: 514, Level: 8 Points: 514, Level: 8 Points: 514, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2006
Location: , , .
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default Performance Penalty for Custom Code Gridview Row B

I've got a Gridview in which I am displaying several different row formats, based on row content.

I'm considering three different options for the itemtemplate design.

1) Pre-build multiple custom panels, one for each major type of row format, with the fields all positioned and formatted, and show and hide them, based on a set of rules. This would also involve the use of in-line <%# procedure calls to get certain formatted values.

2) Pre-build one panel with all the fields in it, and in, _rowdatabound, show, position, and format the fields individually, based on a set of rules (using CSS to minimize the format and position attribution, where possible.)

3) Start with an empty panel and, in _rowdatabound, add to it just the fields needed that particular row (and format and position the fields), based on a set of rules (again using CSS where it helps to do so.)

The application will involve row sets counting typically less that 100 items (could go much higher, but that would be down the road a ways in the product lifecycle).

I my view, options 2 and 3 would be easiest to work with from a coding standpoint.

My question is: would there be significant (i.e. externally noticible) performance differences among these three options?

At one level, it would seem that the page generator has to go through all the steps in any case. However, I wonder if ASP.NET has high performance internal routines that, in option 1, and to a lesser extent in option 2, would beat the pants off my custom compiled VB. (Or would that make any significant difference at the row volumes I'm contemplating?)

Any guidance on how this would be appreciated.