State few tips to improve performance of Web Application ?

Tips to improve performance :
  1. Connection Pooling : Connection between Web Application and SQL Server is expnsive. So, connection pooling can improve performance.To use connection pooling, use the same connection string. Also , open the connection, do the work and then close the connection.
  2. Paged Data Access : Datagrid with paging would show fixed number of records. Suppose a Datagrid is bound with 100000 records but if page size is 25 , then Datgrid would display only 25 records out 100000 records. Data layer has to fetch all 100000 records and bind to Datgrid hence performance would be bad. So , Paged Data Access would really improve performance wherein you fetch only fixed number of records to be shown in Datagrid using stored procedure.
  3. Caching : Caching data would improve performance. Data is used more than once is good situation to use Caching. Also, data is general and not user or request specific is an ideal situation for Caching
  4. ViewSate : Viewstate is used to store state data in hidden field in page.When the page is posted back to the server, the server can parse, validate, and apply this view state data back to the page's tree of controls. There are a number of drawbacks to the use of view state, however. First of all, it increases the total payload of the page. There is also an additional overhead incurred when serializing or deserializing view state data that is posted back to the server. Lastly, view state increases the memory allocations on the server.So diabling View State will improve performanca of page.Within a control, you simply set the EnableViewState property to false, or you can set it globally within the page using this setting.
  5. Return Muliple RecordSet : Returning multiple recordset will improve performance by reducing time spent and resource spent to cumminicate with SQL

Popular Posts