3. JIRA Plugin Performance Tuning
Why tune a plugin?
Server Side Profiling
Client Side Profiling
Performance Pitfalls
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. 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. JIRA and JProfiler
add profile option to catalina.sh
watch the console for when to connect the profiler
10. Wrap-Up
Setting up JIRA for Profiling is not hard
Profiling saves time pinning down performance
problems
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. 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
16. Performance Pitfalls
JQLs vs HitCollector: Example from GreenHopper
for a 50% gain
Dangerous convenience: CSS selectors in IE
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
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
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
27. CSS Selector after tuning
Modified Prototype with switch for element extension
hotspot is gone
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. 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/