Sunday, February 19, 2012

For me the performance of any web application can be assessed by only two important factors. One is processing of code in server and then carrying those processed output though network & wires to end users. If you processed your code faster than output transmittal through wire is another parameter that makes lot of difference. Its thumb rule, less weight faster it traverse through wire and get downloaded at browser much less time. My intention is to bring some light on these two things. There are different aspects of scale out and scale in approach to support huge user base but that is not my objective. My first level to assess any application is to probe these areas, what time it takes for any code to get processed and give output and next more interesting; how fast I can pass that output to end users browsers window?

1) Time to process input and give output2) Time to transmit the processed output to end users

This is first level approach to improve performance of any system according to me. Then what comes next is, system capacity thereafter all planning to scale in or scale out servers to support concurrent/user base count. Not to waste much time out here understanding those nitty-gritty’s. My focus areas are,Part 11) Code review. Reduce Warnings. Apply best practices Common e.g make use of string.builder , string.empty, string.IsnullOrEmpty()==true, Remove unwanted references.2) Check cyclomatic complexity. Terminate unnecessary looping ,apply break if possible3) Always keep tracing and bebug false4) Use Server.transfert wherever possible5) Make use of datareader wherever possible. Reduce use of dataset6) Open and close the connection in the method.7) Explicitly close connections in case of data reader.8) When using DataReaders, specify CommandBehavior.CloseConnection.9) Do not explicitly open a connection if you use Fill(SQL dataadapter or Update for a single operation.10) Avoid checking the State property of OleDbConnection.11) Connection Pooling.