I see a lot of complaints about DNN's performance. I will give here some tips which you can use to improve the performance.
- If you have access to IIS, enable compression and make the compression level 90% by changing an entry on the IIS metabase. Add the file extensions wmisin gon top of the default ones.
- DNN was developed years ago when optimization was not an important factor. By looking at the page sizes, there's alot of bloat. My guess is that a group of developers will have to comb through the code and add these optimization techniques:
- All static files need to be minified and compressed. All js and css files need to have white spaces removed. A compressor will change js's methods and variables from long ames to single character. IIS compession will compress these files further.
- all static files (css, js, and images) need to have far in the future expiration dates so that the browser can cache these files. Use versioning in the filenames so that you can force the browser to pick up the newer files if they change before the expiration date. Something like ../images/logo.gif?v=1. The browser's cache validation depends on the url. If you need to send a newer version of the logo then do ../images/logo.gif?v=2. It's still the same filename. It's better than having multiple copies of the the image with names like logo2.gif, logo3.gif.
- Modern browsers open up to 6 connections per hostname to do pararel downloading of page components. The magic word here is hostname. This means you can have the browser open more than 6 connections by using different hostnames. So use a different hostname for some of the static files. If your domain name is example.com, use images.example.com for the images and make that hostname point to the images folder in your site. However this means your images will need to have the full url like images.example.com/logo.gif. When you do this, the browser can open up to another 6 connections (12 connections now) because now you're using two hostnames. Most big sites use this technique. If you look at yahoo.com source, you will notice that they use yimg.com for their images. That's so that the browser do more parallel downloading. (note: you can force your browser to change the default. It's in the registry for IE and about:config in Firefox. Another hint, enable pipelinig in FF. Don't know if pipelining is implemented in IE8. Pipeliming is browser sending multiple requests in parallel in the same socket).
- Combine small images into a single images and use css sprites and use background-position with height & width to display the image you want. If you go to igoogle.com and look and do view image info on the logo, you will notice that it's made up of several images. This trick saves http requests by consolidating the requests into just one and have a single image to cache.
- A page should send a single cookie. The web server needs just one for the page. Don't have the images send their own cookies.
- combine css files into a single file and js files into one when possbile. Remove unused css selectors from your css files. You can use a tool like dust me selector Firefox extension to help you.
- ASP.NET's output cache is very powerful. I didn't look at DNN's pages to see if they use it and how often. Output cache will make IIS cache the html for the page. This means when it's cached, none of the events and methods need to execute in the code behind. This saves execution and rendering time. You can even cache pages which depend on data coming from SQL Server by using SQLDependenceCache. Use the asp.net cache as often as possible and use cache dependecy to invalidate the cache when needed. I guess this advice is for the developers, not for users.
- compress the images as much as possible without losing image quality. Paint programs like photoshop can show you the sizes for ong, jpg & gif. Use the one with the smallest size. jpg is not always the best. images with duplicate adjacent colors like solid color bar charts compress better as gif than jpg. jpg's are more suited for photographs. Use lower bit rates if image doesn't jave many colors. No need to use 24 bit images if image has a handful of colors.
- Crop images by removing all the white border and come as close to the edge of the image itself.
- Use css instead of html tables for layout. css renders faster and you have more control for positioning text.
- Precache images in the onload js event (or ready in JQuery). For example, in the home page, retrieve the images for subsequent pages so that they get cached in the browser and when the user goes to the next page, the images are already in the cache. You can do the same for retrieving images for part of the page under the fold. defer retrieval till onload so that the page renders very quickly and do more rerievals in the background.
- Use fine tuned minimalist Ajax. Meaning instead of putting a gridview in an updatepanel where all the html goes of the gridview goes back and forth, use javascript to update the cell(s) by using web services or page methods and json. It takes more effort to do it but it pays later in production.
- Don't use images for links. Use text and css instead.
- Don't use asp.net labels for displaying text. Use literals as they don't add span tags. Or do it in js using innerHTML.
- Use asynchronous pages. This is more about scalability than performance. It saves threads in the thread pool so that asp.net can serve more requests instead of having threads waiting till your latent heavg operations are done.
- Learn about viewstate. viewstate can fatten web pages big time. It should be disabled unless needed.
- Use tools like YSlow and determine the areas which need more work.
- Start using MVC and be done with page events and viewstate and bloat. :)
- There are tons of tricks and tips to shave off bytes here and there. I think DNN can use many of the tips I have mentioned and make DNN meaner and leaner. This means going back to the existing architecure and find areas where things can be done better.
Two areas where I think DNN suffers the most: performance and UI. The UI is quite outdated and needs to be more slick with more drag & drop capabilities and more AJAX.
good luck.