开发者

performance issues

We are running an ASP.NET application and now our traffic has increased a lot which resulted in slow response time to us开发者_高级运维ers. We have optimized the application and the database but still the desired response time is not achieved. We have tried ASP.NET Cache but it didn’t help either. What are the other options that I can try? I am looking for a scalable solution that should be able to handle more traffic in future.


If the problem is on your database - then you need to optimize better, better hardware, dba analysis, etc.

If the problem is a slow web app you need to profile and figure out exactly where the slowness is happening. This is much to vague of a question here. Download ANTS Profile or write your own trace output (ants is easier IMHO) and see where your app is slowing down. Is it because of session locks, database, linq queries executing time and time (for instance calling query.Count() will re-execute the query every single time) etc etc

Check your viewstate size - use the tool fiddler to investigate page size, time to first byte, etc.

This is a vague question but these are some basic items.

We need more info but this should get you started.


Asp.net cache itself has some limitation and performance issues. It doesn't make app scalable because it is in-proc in nature. However if scalability is your major concern then you need to implement Distributed Caching. Distributed Cache can make application highly scalable. Basically In-memory distributed caching is a form of caching that allows the cache to span multiple servers so that it can grow in size and in transactional capacity. It is also a very scalable because of its architecture. It distributes it works across multiple servers but still gives you a logical view of a single cache. I’d rather suggest you NCache on the behalf of my experience. For further details just go through this article “improve asp.net app performance and scalability”. It’ll surly help you.


I would like to emphasize on the answer of @AdamTuliper in regards to the ViewState

You might be having a lot of GridViews that get populated with huge data. Consider turning ViewState off if not required. Meaning: if the user does not interact with the gridview (by selecting a row, updating, etc..) then there is no need for the grid view to go back and forth between server and client.

If however, this is not the case, then we will need more info to be able to provide help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜