Performance tips

This is a hard area to give advice on but in general there are a couple of ground rules.

  • Design you website so that dynamic pages are kept to a minimum. They are of course needed and we don’t advice against them but don’t get used to always turning page cache off as it severely reduces scalability. If you can get by with creating a separate page with you dynamic logic instead of putting everything in one super dynamic component which sends around a lot of parameters that is often justifiable for a high load site.
  • Use JSP instead of velocity or freemarker. Faster and consumes less memory.
  • Never use recursive macros in Velocity. Under load macros in velocity does not seem to be thread safe. Could be better since 2.4.6 which includes Velocity 1.5.
  • Make sure what component takes the most time and analyse what in it is expensive. Perhaps it’s a badly written component or perhaps we could optimize InfoGlue. Let us know.
  • Make sure to use the new component cache available from InfoGlue 2.0 and forward. It let’s you cache parts of a page and leave other parts dynamic.
  • Check the database so the indexes in InfoGlue are ok. If one index are broken it can affect performance big.
  • Set up a load balanced set of live servers or cms-servers. Also make sure you separate the live database and the cms-database.
  • Use the ViewApplicationState.action view to analyze which components are slow. Focus on those when optimizing. More info in the diagnostics chapter on that topic.


comments powered by Disqus