Profiling
You can profile server side using Glimpse. Check the tutorial on ASP.NET website. Other than Glimpse there are profilers like MiniProfiler. See Hanselman article about Glimpse.
Using Asynchronous Methods
.NET framework maintains a pool of threads that are used to service ASP.NET requests. When a request arrives, a thread from the pool is dispatched to serve the request. If the request is processed synchronously the thread cannot server another request.
Thread pool has a limited number of threads. The default maximum for .NET 4.5 is 5000. (See SO and SO) If a large application runs at high concurrency, all available threads might be busy. This is known as thread starvation. When this condition reaches, web server queues the requests and if the queue is full, server rejects requests with HTTP 503 status (Server Too Busy).
If you make asynchronous calls it'll increase the responsiveness. An asynchronous call takes same amount of time as synchronous request however thread is not blocked from serving other requests. This prevents request queuing
There are many benefits of using asynchronous methods to serve data.
Bundling and Minfication
0 comments:
Post a Comment