ASP.NET 2.0 Performance Inspection Questions - String Management

From Guidance Share

Jump to: navigation, search

- J.D. Meier, Srinath Vasireddy, Ashish Babbar, Rico Mariani, and Alex Mackman



Contents

Do you use Response.Write for formatting output?

Identify areas in your code where you concatenate output, such as to create a table, and consider using Response.Write instead. Response.Write is the most efficient method for writing content to the client.


Do you use StringBuilder to concatenate strings?

If the number of appends is unknown and you cannot send the data to the client immediately by using a Response.Write, use the StringBuilder class to concatenate strings.


Do you use += for concatenating strings?

Identify places in your code where you perform string concatenation by using the += operator. If the number of appends is unknown, or you are appending an unknown size of data, consider using the StringBuilder class instead.


Related Items

For more information about the questions and issues raised in this section, see ASP.NET 2.0 Performance Guidelines - String Management.

Personal tools