Showing posts with label Performance. Show all posts
Showing posts with label Performance. Show all posts

Friday, October 3, 2008

Improving Website Performance - Part 2

Make Use of Repeater control
The ASP.NET controls datagrid, datalist and dataview are heavy on the HTML and doesn't provide scalable performance benefit. Repeater controls provide a better performance over the other ASP.NET controls.

Build the project in Release mode
While building a project make sure to set up the build in release mode. The build in debug mode creates PDB's which overloads the server performance.

Avoid strings and use StringBuilder
The performance of stringbuilder.append is better than string + string. StringBuilder can be a good choice if the concatenation count is more than 3.

Use Server.transfer
server.transfer - sends the request directly to server
response.redirect - sends the response header to client and client in turn sends the request for redirection causing multiple request path.

Tuesday, April 22, 2008

ASP.NET Data connection performance considerations

“Plan for the performance from the beginning of the development life cycle”.
“Don’t add performance as a post step”
“Design the application for better performance”
The development team must be stressed to focus on the application performance from the beginning not at the end of the life cycle. Some of the recommendations for better data management are

> Open Connections late and close them early.
> Get rid of the connection if it’s not in use.
> Reuse the connection optimally
> Close the connections explicitly
> Use single connection string as different connection string can generate multiple connection pools
> Return what we need from the database