Performance considerations while architecting Asp.Net
- Use Session State only if you need to
- Use View State only if you need to
- Avoid Auto event wireup
- Remove unnecessary Http Modules
- Encode request and response using ASCII instead of UTF
- Use optimal Authentication procedure. in order of increasing cost: None, Windows, Forms, Passpost. Make sure you use the cheapest one that best fits your needs.
- Aggressive Caching will improve performance. OutputCaching of many types
- Duration—Time item exists in the cache
- VaryByParam—Varies cache entries by Get/Post params
- VaryByHeader—Varies cache entries by Http header
- VaryByCustom—Varies cache entries by browser
- Override to vary by whatever you want:
- Fragment Caching—When it is not possible to store an entire page (privacy, personalization, dynamic content), you can use fragment caching to store parts of it for quicker retrieval later.
- VaryByControl—Varies the cached items by values of a control
- Cache API—Provides extremely fine granularity for caching by keeping a hashtable of cached objects in memory (System.web.UI.caching). It also:
- Includes Dependencies (key, file, time)
- Automatically expires unused items
- Supports Callbacks
Comments