June 18, 2014

Improving Web Application Performance

Have you ever been asked for investigating on performance issue of a web-application to find out what is going wrong and what kinds of actions need to be done to increase the speed? In a few words, I am going to suggest you to focus on these three aspects to overcome performance problem very fast.  

1- Client Side

For the first step, try to take a look at the size of main pages, and specify how much kilobyte is each of them? If the size of pages are too heavy for the user’s internet speed, think about these key points: The extra information which are rendered on the page that can be removed. For example: one GridView has 10 columns while regular user always needs 3 columns of data for his job. Think about State Management architect whether huge amount of data are being stored in the ViewState. How many sections of the pages can be cached. Like Footer, Header, Menu and etc.  

2- Communication

Using developer tools try to find out these facts that: How many connections to the server are being created to load your pages? If there are think about bundling. Are your pages compressed or not? If the answer is negative, think about the best implementation of page compressing?  

3- Server Side

In the server side aspect, there are a lot of issues can lead to the poor performance you can consider about. But in majority of cases by considering these two main topics you can catch the goal.

* Database Optimization
* Caching

In database optimization, try to do some ordinary actions like: checking queries speed, database size and indexes.  

Caching topic can separate to two important categories:

  • Caching on Data

Caching on data should be implemented on the repository layer and there are a lot of solutions and tools to use, that is out of this blog’s scope.

  • Caching on Page

In the step one, You have exploited the necessity sections of the pages to be cached. Right now, it is turn to implement server side code for caching page content.

Definitely, there are a lot of other consideration should be taken into account for performance issue in web-applications, but these key points can be the best and fastest steps for solving the problem.