Page size can also be reduced using Http compression in IIS. Compression tool can also be used to reduced the size of rendered content.

28. Normalization

We should follow normalization rules in database table design but over Normalized tables can cause excessive joins for simple requirement. We should not make excessive joins for performance overhead and hence it is better to normalize only as much as required keeping in mind the performance issue.

29. Efficient Coding

While coding we should keep in mind the below issues which are potential performance drains:

1. Avoid use of Finalize method unless it is absolutely necessary.
2. Make a class sealed if inheritance is not required.
3. Avoid calling GC.Collect();
4. Use X+=1 instead X=X+1 to avoid evaluating X twice;
5. Use overloaded methods instead of different method names where possible.

30. Define The Scope of An Object

Defining an object’s scope properly increases efficient memory management and thus improve performance. We should keep the object scope at a lower level instead of a global level if possible because the garbage collector works more frequently on short lived object .

31. Using Loops

We should keep in mind while using loops in our code:

1. Better to use for a loop instead of foreach.
2. Do not create objects inside loop if not required absolutely.
3. Calling methods and properties inside loops is expensive.
4. Evaluating count etc. before loop starts. For example: