Related Content
Tags
Architecture
Configuration
Hosting

Performance Troubleshooting Tips

Posted by Osvel Legon on November 2, 2011
0 people like this tutorial
Rate:

Server Side Performance Tips

  • Select only the content you need to display:
    • Apply filters when selecting the content to display
      • Data.GetDataView(ContentRefernceName).Table.Select(Filter, Sort);
      • AgilityContentRepository.Items(Filter, Sort)
  • Add pagination to the selected content
    • Agility.Web.Dat.GetDataView(ContentRefernceName).Table.Select(Filter, Sort).Skip(Offset).Take(PageSize);
    • AgilityContentRepository.Items(Filter, Sort) .Skip(Offset).Take(PageSize);
  • Do not select all the content and then apply the filters or pagination
  • Cache your response items:
    • Use AgilityDependencyCache for Agility items
    • Use HttpContext.Current.Cache for UGC items
    • Use HttpContext.Current.Items for values that are used by more than one piece of code (controls, modules) and could be shared during the lifetime of the request
    • Move complex or time consuming operation outside the website
      • Windows service can create complex content that the website can use without the delay in the request generating the content
      • Treat third party applications/resources as if they have bad performance
        • Third party resources must be cached locally to avoid downtimes from the original source
        • Use a service outside the website to get and update those resources locally and avoid slowing request time.
        • Lock the request code for those external resources: you don’t want to be downloading the same resource multiple times at the same time.
        • Lock the code in areas that requires heavy processor or resources use

Client Side Performance Tips

  • Load CSS files at the head of the document
  • Load JS files at the bottom of the body of the document
  • Delay the execution of the scripts after the load of the JS files at the bottom of the document
  • Use the semantically correct HTML tag. Reduce the number of DOM elements.
  • Make JavaScript and CSS external. Reduce the inline/obtrusive JavaScript and style  
  • Reduce HTTP requests
    • Minify & combine JS and CSS files
    • Avoid redirects
    • Make Ajax calls cacheable in the browser
    • Use the correct HTTP verb (GET/POST)
    • Avoid empty Image src attribute
    • Optimize images
      • Use CSS sprites
      • Don’t scale images

Add a Comment

   
  
 
 
   
Submit

LOGIN

Log in with your Agility username and password or
register for the site




Log In

REGISTER












Register

FORGOT PASSWORD