AtlasCamp 2010: JIRA Plugin Performance Tuning - Alex Hennecke


Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

AtlasCamp 2010: JIRA Plugin Performance Tuning - Alex Hennecke

  1. 1. Everyone likes fast things
  2. 2. Alex Hennecke Senior Java Dev GreenHopper JIRA Plugin
  3. 3. JIRA Plugin Performance Tuning Why tune a plugin? Server Side Profiling Client Side Profiling Performance Pitfalls
  4. 4. Why tune a plugin? JIRA is optimised for own use cases Plugins may do crazy, unexpected things with JIRA's data Slow applications suck
  5. 5. Server Side Profiling allows you to... find long-running code find code waiting for locks but... profiling can have deceptive overhead depends on external factors like GC, I/O, ...
  6. 6. JIRA and JProfiler add profile option to watch the console for when to connect the profiler
  7. 7. JProfiler CPU View identify long-running call see the chain of calls that leads to slow methods
  8. 8. Profiling under Load Keep an eye on memory usage and GC times jconsole
  9. 9. Profiling under Load Watch for pool size limits server.xml
  10. 10. Wrap-Up Setting up JIRA for Profiling is not hard Profiling saves time pinning down performance problems
  11. 11. Client Side Profiling why? rich UIs are heavy on JavaScript JS frameworks can hide performance traps allows to... identify reasons for slow page load find performance hotspots in JavaScript
  12. 12. JIRA and dynaTrace install a VM with Windows and target IE Version install dynaTrace AJAX Edition login and remember-me to JIRA from IE add the URL you're testing to dynaTrace
  13. 13. Profiling Result - Overview
  14. 14. JavaScript Details identify hotspots script call stack script source
  15. 15. Wrap-Up Use client side profiling as a starting point Tune JavaScript and page load time
  16. 16. Performance Pitfalls JQLs vs HitCollector: Example from GreenHopper for a 50% gain Dangerous convenience: CSS selectors in IE
  17. 17. JQL vs HitCollector For statistics, both use Lucene LuceneSearchProvider.searchCount is faster for few queries Single search with a HitCollector is faster than many JQL queries
  18. 18. Why is that? Creating a JQL query does permission checking
  19. 19. HitCollector JIRA offers DocumentHitCollector
  20. 20. HitCollector DocumentHitCollector has to load the document from Lucene, not just count the index Custom logic is required to do the actual counting But it still beats many JQL queries
  21. 21. GreenHopper 5.0 Statistics performance on the server increased by 50%
  22. 22. CSS Selector in IE IE has no native way to find nodes by class Attribute selectors or selectors with wildcards have to walk the DOM tree Prototype's extension mechanism is slow on IE
  23. 23. Bad examples $('.myCssClass') $('div[class*=myCssClass]') $('div#myId')
  24. 24. Good examples $('#myId div.myCssClass') $('#myId div[class*=myCssClass]') $('#myId')
  25. 25. Prototype CSS Selector in IE Timeline view in the profiler slow method
  26. 26. Prototype CSS Selector calls prototype element extension prototype CSS selector
  27. 27. CSS Selector after tuning Modified Prototype with switch for element extension hotspot is gone
  28. 28. There's a lot more Cache data that's expensive to fetch Use Web Resources, they give you no cache expiry (no more 304's) batched mode (less requests)
  29. 29. Further Reading JIRA Web Resource jQuery Performance Rules dynaTrace Application Performance Almanac Kirk Pepperdine
  30. 30. Performance is King