Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Speed up your XPages Application performance

Webinar on XPages Application performance enhancements

  • Login to see the comments

Speed up your XPages Application performance

  1. 1. © Maarga Systems Inc., 2012© Maarga Systems Inc., 2012 Maarga Systems
  2. 2. © Maarga Systems Inc., 2012 Lakshmi Sankaran Project Lead Maarga Systems http://bit.ly/9mobile
  3. 3. © Maarga Systems Inc., 2012  Introduction  Factors affecting performance  Best Practices – Server Level & Application Level  Common Bottlenecks & fixes  Tools to identify common bottle-necks  Q&A
  4. 4. © Maarga Systems Inc., 2012  Application Modernization – XPages App Deployment/Maintenance is critical  Server-Level & Application-Level parameters to be properly configured.  Performance a constraint for adoption, if not addressed properly
  5. 5. © Maarga Systems Inc., 2012  Server Capacity  User Community and concurrent user load  Network Speed / Bandwidth  Application Heaviness – GBs  Last but not the least – Code Quality.
  6. 6. © Maarga Systems Inc., 2012  Recommended H/W & S/W configurations of Server  notes.ini configuration  Xsp properties
  7. 7. © Maarga Systems Inc., 2012  OS – A 64 bit OS is recommended  32-bit Domino has limits on setting HTTPJvmMaxHeapSize (<= 512 MB)  Memory - Give Server lots of RAM  More the RAM, more can be the HTTPJvmHeapSize  Isolate heavily used XPages Apps from other memory intensive apps such asTraveller
  8. 8. © Maarga Systems Inc., 2012  HttpJVM MaxHeapSize  Set to 1/4th of available RAM  HttpJavaMaxheapSizeSet  Set to 1 to prevent MaxHeapSize from reverting to default value.  Default is 256M for 851 servers, 64M for 852 Servers
  9. 9. © Maarga Systems Inc., 2012  Use run-time optimized java script  Configure Server Page persistence to keep pages in memory (small no. of users) and disk (for large users)  Configure appropriate application/session time-out to prevent inactivity http://books.google.co.in/books?id=PWmRO0qrjKUC&pg=PT29&lpg=PT29&dq=sample+xsp+ properties+file&source=bl&ots=M2yUrpIeqF&sig=AcSp4SrcUJEMEluZO_8dDGPtRZk&hl= en&sa=X&ei=dseuUeXQGciVrgfw_oHwBw&ved=0CGgQ6AEwCA
  10. 10. © Maarga Systems Inc., 2012  xsp.persistence.mode = fileex  Xsp.persistence.maxviews = 16 ● Server-side control tree caching. Also the related options: ● xsp.persistence.file.maxviews, xsp.persistence.file.gzip, xsp.persistence.file.threshold, xsp.persistence.dir.xspstate  xsp.application.timeout=30min  xsp.session.timeout=30min ● Server timeouts  ibm.jscript.cachesize ● Server-side JavaScript expression cache  xsp.compress.mode=gzip ● Network files are smaller (enabled by default)  xsp.resources.aggregate = true ● Fewer requests for CSS and JS files, aggregated files are cached  xsp.expires.global=10days ● Browser expiration for CSS & JS global files [global == not in application]
  11. 11. © Maarga Systems Inc., 2012
  12. 12. © Maarga Systems Inc., 2012  Out of Memory Exceptions  Check HttpJVMMaxHeapSize  SessionTime-Outs  Check time-out interval  Higher Load times  Application Size - Check Views, Index Sizes  Lookups  Partial Refreshes  Scoped variables – Application / Request Scopes
  13. 13. © Maarga Systems Inc., 2012  Which of the following tools you have used during your development process  XPages tool box  YSlow  Pagespeed  Extended Status Bar  FireBug
  14. 14. © Maarga Systems Inc., 2012  XPagesTool Box  Yslow/Page Speed  Firefox Extended Status Bar
  15. 15. © Maarga Systems Inc., 2012  Usage of XPagesTool Box  CPU / Memory / Backend Profiling can be done  Backend Profiling –Wealth of information on methods and their usage  Should be used during development/Testing cycles  Production use – Only for critical problem resolution
  16. 16. © Maarga Systems Inc., 2012
  17. 17. © Maarga Systems Inc., 2012
  18. 18. © Maarga Systems Inc., 2012
  19. 19. © Maarga Systems Inc., 2012  IncreasingView Index Sizes  Recreate views – DO NOT copy/paste existing Views.They tend to increase sizes  Avoid Duplicate aliases –View indexes get doubled.  Golden Rules  Remove unnecessary Sorting/Styling of columns  Avoid Complex formulas inViews  Avoid @Now or @Today inViews
  20. 20. © Maarga Systems Inc., 2012  Free-up memory  Purge Indexes  Compact Db (Copy Style option) and Re-Build Indexes
  21. 21. © Maarga Systems Inc., 2012  Optimize usage of DB Lookups/Columns – They are highly expensive  XpagesTool Box comes in Handy – Identify no. of dblookup calls and their places  Use caching of dblookup results
  22. 22. © Maarga Systems Inc., 2012  Commonly used in fields.  Check options – Do notValidate or Update data, Process data withoutValidations, Set Partial Execution mode  Disallow user action during Partial Refresh  Using static ‘Loading’ indicator
  23. 23. © Maarga Systems Inc., 2012  Optimized usage of Scoped variables  Application Scope  Application level variables that is common to all users can be stored (e.g) – Path of a Lookup DB, Server etc..  Request Scope  Query String related parameters
  24. 24. © Maarga Systems Inc., 2012  View Scope  Session Scope  User level information  Employee details – As long as the employee session is active, the information is available to access
  25. 25. © Maarga Systems Inc., 2012  Memory leaks are possible when objects are not recycled properly.  Use Recycle() to remove all Domino objects after use. var aView:NotesView = database.getView("SomeViewName"); var doc:NotesDocument = aView.getFirstDocument(); while (doc) { // do some processing on doc doc = aView.getNextDocument( doc );} --------------------------------- (to) ----------------------------------------------------------------------- var vw:NotesView = db.getView("SomeViewName"); var doc:NotesDocument = vw.getFirstDocument(); while (doc) { // do some processing on doc var nextdoc:NotesDocument = vw.getNextDocument( doc ); doc.recycle(); var doc:NotesDocument = nextdoc; }
  26. 26. © Maarga Systems Inc., 2012  Need for performance Optimization  Server – Level Parameters  Xsp properties  Application Level changes – Coding Best Practices
  27. 27. © Maarga Systems Inc., 2012  http://www.entwicklercamp.de/konferenz/ent2013. nsf/bc36cf8d512621e0c1256f870073e627/815cc2ed1 4d57f39c1257a44002b8b22/$FILE/T4S6- Performance.pdf  http://bruceelgort.files.wordpress.com/2012/05/ad mindev2012_elgort_experttipsandtricks1.pdf  http://xpageswiki.com/web/youatnotes/wiki- xpages.nsf/dx/Memory_Usage_and_Performance
  28. 28. © Maarga Systems Inc., 2012
  29. 29. © Maarga Systems Inc., 2012 ThankYou

×