Performance Boosting .NET coding tips

Performance Boosting .NET coding tips

Performance Boosting .NET coding tips

# Instantiate Objects only if really needed { will NOT use up memory unnecessarily }

# Prefer using String.Empty instead of “” for string initialisation

# Prefer using StringBuilder for dynamic creation of Strings.

# Avoid String datatype while using Switch Case programming-construct

# Use Server.Transfer() instead of Response.Redirect() method.

# Avoid use of Page.DataBind() method

# Define the four most frequently used local variables as the first four variables.

# Even inside vb.net OR c# code, Avoid using the “select * from table� syntax.

# Use proper column case in queries.dr[“ProductName�] vs dr[“PRODUCTNAME�]

# Use Page.IsPostBack to minimize redundant processing in page load.

# Avoid server round trips (by using client scripts, validator controls, html controls, caching techniques (for pages, user controls and objects)).

# Disable view state on a control-level / page-level if you do not need it.DataGrid with ViewState disabled is 66% faster than DataGrid with ViewState enabled.

# Minimize the number of objects you store in view state.

# Use a DataReader for fast and efficient data binding.

# Prefer to Use try/finally on disposable resources.

# Minimize calls to DataBinder.Eval

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.