stagemonitor icon indicating copy to clipboard operation
stagemonitor copied to clipboard

Performance optimization: eliminate redundant allocation of SimpleDateFormat instances in ElasticSearchReporter

Open SereneAnt opened this issue 7 years ago • 0 comments

The single line in StringUtils#getLogstashStyleDate(long) produces about 7-8% of total stagemonitor TLAB allocation (GC pressure) in my production system.

The optimizaton is pretty trivial: wrap stateful DateFormat instances into ThreadLocal that is safely initialized and accessed per thread.

SereneAnt avatar Jul 17 '18 03:07 SereneAnt