The flashcards below were created by user
on FreezingBlue Flashcards.
What areas should we consider in ASP.NET applications?
What performance improvements can typically be made on the database?
- (1) Indexing and non-indexing
- (2) Normalization of database (reduces redundancy)
- (3) Improve queries by reducing column returns such as the elimination of the * in the select statement
- (4) Stored procedures and Indexed Views
- (5) Use of sargable queries
- (6) Comparison of queries in SQL Analyzer to get performance improvements and execution plans
- (7) reduce size of some column type and quantities, ie, varchar vs char vs text
- (8) not start stored procedures with "sp"
What performance improvements can typically be made in C# / ASP.NET?
- (1) Control state management objects between pages within app (ie., viewstate to reduce network traffic and repeat calls)
- (2) Improve container structures and calls (ie., immutable objects, array vs List)
- (3) Greater use of stored procedures and indexed views
- (4) Release unneeded objects (Dispose)
- (5) Remove unneeded content in web.config file
- (6) passing of large objects by reference instead of by value,
- (7) greater use of global assemblies such as libraries used by multiple applications which are then cached on the server.
- (3) Optimize image files and content so that items are smaller, perhaps placing them into .jpg files or converting certain images into CSS manipulated files,
- (4) Perform better client-side interaction and validation (reduces network load),
- (5) Use of jQuery to improve web browser accessibility and speed,
- (6) Consider use of AJAX to reduce page postbacks while also reducing network traffic,
- (7) CSS sprites,
- (8) Client-side caching,
- (9) File compression (images and files),
- (10) File minification,
- (11) Combining of files
How much improvement can modern website typically expect and from where?
Modern websites can typically expect an 80% performance improvement simply by improvements made on the front-end. The fact of the matter is, when loading a webpage, servers are typically very fast in their response and so bottle-necks are almost always on the client machine or the network to-and-from the client to the server.
What is file compression?
What, besides reducing image sizes, is the biggest website performance gain?
What are some VERY useful applications for improving web performance?
Fiddler, FireBug, Microsoft AJAX Minify, IE F12 Developer Tools, CSS Sprite Generator, and dozens of others.
Caching on the browser is typically defaulted already, however, you would also need to make sure that HTTP Response header doesn't contain any details to prevent or force the caching. Modifying the cache statements in the headers can be done in IIS or by modification to the web.config file, such as this statement to force a 30 day reload of cache:
How would you reduce HTTP calls?
How would you validate performance improvements?
You would begin by using Fiddler or similar program to monitor several performance items, most typically, (a) size of files or images being downloaded, (b) number of times an HTTPResponse is made (ie, Microsoft website does 99 of these for their default page), and (c) load times associated with sending the HTTP content back to the client. Once you've made your various improvements, then you would compare your final results with your original results to determine the difference.
When dealing with photos and non-photo images (icons, logo, etc), what file types should be used?
Photos should be saved as .JPG images and icons or other non-photos should be saved as either .PNG or .GIF files; Each of these can also gain additional size reduction by using a 10% or greater compression technique.
(a) reuse of code, (b) prevents compiler from having to read html, stop and format something, then go back to reading html again (c) all styling can be loaded at once, (d) most importantly, this information can be loaded once, then cached for a time period since it will almost definitely be used on other pages, so won't need to be fetched from the server every time a PostBack or new page is viewed.
Why should ALL styling be done in an external file rather than within the HTML code?
- (a) reuse of code,
- (b) prevents compiler from having to read html, stop and format something, then go back to reading html again
- (c) all styling can be loaded at once,
- (d) most importantly, this information can be loaded once, then cached for a time period since it will almost definitely be used on other pages, so won't need to be fetched from the server every time a PostBack or new page is viewed.
What is caching and how is this achieved in a website?
- Caching allows website content to be maintained in memory rather than fetched from hard-drive every time a request is made for a given resource.
- For example, a large website may use a single cached CSS file...rather than keep requesting this entire file every time a person clicks on an image, a webpage header can contain directions which tell the browser to keep reusing the file for a given period of time (page-level or application-level caching). Another good example using caching is the web.config file which is loaded once and used across the same application even if ran by several different users on different computer systems.