Everyone likes fast things
Alex Hennecke
Senior Java Dev
GreenHopper JIRA Plugin
JIRA Plugin Performance Tuning
Why tune a plugin?
Server Side Profiling
Client Side Profiling
Performance Pitfalls
Why tune a plugin?
JIRA is optimised for own use cases
Plugins may do crazy, unexpected things with
JIRA's data
Slow appli...
Server Side Profiling
allows you to...
find long-running code
find code waiting for locks
but...
profiling can have decept...
JIRA and JProfiler
add profile option to catalina.sh
watch the console for when to connect the profiler
JProfiler CPU View
identify long-running call
see the chain of calls that leads to slow methods
Profiling under Load
Keep an eye on memory usage and GC times
jconsole
Profiling under Load
Watch for pool size limits
server.xml
Wrap-Up
Setting up JIRA for Profiling is not hard
Profiling saves time pinning down performance
problems
Client Side Profiling
why?
rich UIs are heavy on JavaScript
JS frameworks can hide performance traps
allows to...
identify...
JIRA and dynaTrace
install a VM with Windows and target IE Version
install dynaTrace AJAX Edition
login and remember-me to...
Profiling Result - Overview
JavaScript Details
identify hotspots
script call
stack
script source
Wrap-Up
Use client side profiling as a starting point
Tune JavaScript and page load time
Performance Pitfalls
JQLs vs HitCollector: Example from GreenHopper
for a 50% gain
Dangerous convenience: CSS selectors in...
JQL vs HitCollector
For statistics, both use Lucene
LuceneSearchProvider.searchCount is faster for
few queries
Single sear...
Why is that?
Creating a JQL query does permission checking
HitCollector
JIRA offers DocumentHitCollector
HitCollector
DocumentHitCollector has to load the document
from Lucene, not just count the index
Custom logic is required ...
GreenHopper 5.0
Statistics performance on the server increased by 50%
CSS Selector in IE
IE has no native way to find nodes by class
Attribute selectors or selectors with wildcards
have to wal...
Bad examples
$('.myCssClass')
$('div[class*=myCssClass]')
$('div#myId')
Good examples
$('#myId div.myCssClass')
$('#myId div[class*=myCssClass]')
$('#myId')
Prototype CSS Selector in IE
Timeline view in the profiler
slow method
Prototype CSS Selector calls
prototype element
extension
prototype CSS
selector
CSS Selector after tuning
Modified Prototype with switch for element extension
hotspot is gone
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)
b...
Further Reading
http://confluence.atlassian.com/display/ATL/Alex+Hennecke
JIRA Web Resource
http://confluence.atlassian.co...
Performance is King
alex@atlassian.com
Upcoming SlideShare
Loading in...5
×

AtlasCamp 2010: JIRA Plugin Performance Tuning - Alex Hennecke

1,923

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,923
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
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 catalina.sh 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 http://confluence.atlassian.com/display/ATL/Alex+Hennecke JIRA Web Resource http://confluence.atlassian.com/display/JIRA/Web+Resource+Plugin+Module jQuery Performance Rules http://www.artzstudio.com/2009/04/jquery-performance-rules/ dynaTrace Application Performance Almanac http://blog.dynatrace.com/2010/01/12/dynatrace-application-performance-almanach-2010/ Kirk Pepperdine http://www.javaperformancetuning.com/
  30. 30. Performance is King alex@atlassian.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×