Is there any differentiation between WebGrid FlyPostback and WebCombo FlyPostBack?

8 replies. Last post: August 22, 2012 9:26 PM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Scott FrenchMember

We have a WebGrid that is setup with a self referencing hierarchy dataset. The dataset can get very large, in some instances over 3,000 records. There are two columns in this grid that use WebCombos bound to SqlDataSources with caching enabled. We've noticed a direct correlation between the performance on WebCombos on the page and the size of the dataset in the WebGrid. When the grid only has a few record the WebCombos can FlyPostBack very quickly and return results. When the dataset in the grid is very large the WebCombos perform very slowly, taking nearly ten seconds to return any data.

Trying to figure out where the bottleneck is we've done some tracking and logging. Our WebGrid contained about 3000 records and both WebCombos contained around 15 records. We started with Fiddler to track the actual information sent in the request and information received in the response when dropping down the WebCombo to bring up the list of items. The amount of data sent in the request is very small and the amount of data received is also very small. There seems to be a slow down on the server side processing even though we are using caching for the WebCombo's datasource and can confirm using the SQL profiler that there is no additional call to the database after the intial load. With this information in hand we decided to start looking into the server side events. We inserted a large number or logging points across pretty much every Page, WebGrid, and WebCombo server side event. What we found were a lot of events being called that we did not expect. There are a lot of WebGrid events being called (this seems to coincide with the information found in the support docs here: "Features and Concepts >> Events >> Event sequence of server side events"). We've highlighted the slowdown area below.

List of server side events called when a WebCombo sends a FlyPostBack request to bring up drop down results (Minute:Second:Millisecond format):

Page_PreInt: 14:32:544WebGrid1_PreInitialize: 14:32:549
WebGrid1_Init: 14:32:551
WebCombo1_PreInitialize: 14:32:554
WebCombo1_Init: 14:32:557
Page_Init: 14:32:571
Page_InitComplete: 14:32:572
Page_PreLoad: 14:32:589
Page_Load: 14:32:591
WebGrid1_InitializeLayout: 14:32:594
WebGrid1_PrepareDataBinding: 14:32:596
WebGrid1_CustomSort: 14:32:598
WebGrid1_OnCustomSort: 14:32:599
WebGrid1_Load: 14:41:142
WebCombo1_InitializeLayout: 14:41:155
Page_LoadComplete: 14:41:158
Page_PreRender: 14:41:160
WebCombo1_InitializePostBack: 14:41:162
WebCombo1_PrepareDataBinding: 14:41:163
WebCombo1_InitializeRow: 14:41:165
WebCombo1_InitializeRow: 14:41:191
WebCombo1_Unload: 14:41:192
WebGrid1_Unload: 14:41:196
Page_Unload: 14:41:197

We lose almost 9 seconds around the WebGrid1_Load call. We assume this is directly related to some kind of WebGrid processing as it will be much faster if there are fewer rows in the table.

That leads us to our question... is there a differentiation between the WebCombo FlyPostBack and the WebGrid FlyPostBack? Meaning when a WebCombo makes a FlyPostBack is there any reason why the WebGrid's events would/should also fire? The page log above would lead us to believe there is no separation and events for both the WebGrid and WebCombo will always fire on FlyPostBack. Is there any way to get around this? Obviously in this case with a large/complicated grid we would prefer a separation between these type of calls. We've already gone through pretty much every other performance boosting option listed (include the FlyPostBackSettings, XMLCompression, ViewStateStorage, etc) so getting to the bottom of this specific situation is very important to us.

EDIT: Follow up question... in the situation where we use multiple WebCombos or multiple WebGrids on the same page what would prevent any single FlyPostBack call from initializing these same events for every control on the page? For example with two WebGrids on the same page, every time a FlyPostBack call is made would all of the associated events for WebGrid1, WebGrid2 and all WebCombos be called? This would help explain performance issues we've run into in the past. I think our assumption always was that any specific control capable of making a FlyPostBack call would only cause events directly related to that control's current FlyPostBack operation to fire. This doesn't seem to be the case.

All times are GMT -5. The time now is 12:39 AM.
Previous Next