My friend from college called up last night in panic,to say that his customer had given him the thumbs down for his XPages project because of the time that it took to run. His said that the mock ups had been great and that the customer had simply loved the user experience. But if he could not get the speed up, there was every chance that he would lose the customer.

This is a scenario which quite a few of us has faced. Here I share with you some of the points to be noted while using XPages, so that the performance speed in terms of transactions per second can be increased.

  • Ensure that your client is using at least Notes/Domino8.5.2 or higher
  • Use Partial Refresh whenever possible
  • Use GET links instead of POST links whenever possible.
    • GET makes use of 2 JSF cycles while POST needs six JSF cycles
  • Limit server side execution of the XPage to absolute necessities
  • Use viewScope objects to maintain server side buffering objects and variables instead of sessionScope and applicationScope
  • Set notes.ini variable HTTPJVMMaxHeapSize to one fourth of the RAM (for example 2048M with 8GB RAM).
  • Use EL instead of SSJS whenever possible
  • You can control how the browser caches your pages by setting the http header “cache-control” like this:var exCon = facesContext.getExternalContext();
    var response = exCon.getResponse();
    response.setHeader(“cache-control”, “no-store”);This no-store option forces the browser to remove all connection data after loading. If you had used no-cache instead of no-store, then the cache is ignored and the page is reloaded every time. If instead, you had used max-age=xx; then the browser will reload the page if the cached page is older that xx seconds.

These are some of the ways that you can use to speed up the performance of XPages application.