PDA

View Full Version : AjaxEvent Performance



jchau
Oct 10, 2008, 6:50 PM
What affects the performance of an AjaxEvent? I have a simple page with one button and one label. On button click, it updates the label from server side via AjaxEvent. Very very fast. I have another more complex page with a grid and a label. On grid row select, it updates the label from server side via AjaxEvent. Much slower than simple page. Is the performance hit from loading the page's controls tree? I disabled viewstate for both pages. I am not rebinding the grid on ajax request either. If I change from AjaxEvent to WebService, the performance is about the same in both.

I am still debating whether to use AjaxEvent or WebService for my application. WebService requires a lot of manual hookup while AjaxEvent is relatively easy to implement. However, I have pages with LOTS of stuff on it. I want to know exactly how that will impact AjaxEvent performance.

Note: I mention grid's AjaxEvent is much slower but this is a relative comparison with the simple page. It's still MUCH MUCH faster than using UpdatePanel or Postback.

Vladimir
Oct 11, 2008, 7:37 AM
Question about your complex page: Do you call Store.DataBind during AjaxEvent (in Page_Load, for example)? If yes then the Data will be returned to the client (plus will be wasted time to retrieve data from your local store (DB or something else))

geoffrey.mcgill
Oct 13, 2008, 2:02 PM
Hi jchau,

We're adding some new functionality to the AjaxEvents and once complete I'll be able to provide a lot more information. The new functionality will provide a granular level of configuration to be able to tweak your AjaxEvents to your specific requirements. 


Using the Default functionality (basically an "Ajax" PostBack) or calling an ASP.NET WebService (.asmx) will both be trivial. 


With some luck I should have some more information and code samples available either late today or tomorrow.