logstash/logstash-core
Jake Landis 9b4d7c51ae Performance: Use RubyArray.hash for metric's fast lookup key
The existing implementation uses the RubyArray as the key for the fast lookup Map. Under the covers the Map implementation is comparing equal operators (many times per event), and JRuby Array equals operator is VERY expensive since it literally walks each value of array for each equality. Based on profiling via YourKit, the JRuby Array equals operator is a very hot method consuming upto 60% of sampled CPU cycles while under high load (and no other CPU dominators).

This change is to use the .hash value of the JRuby Array as the key of the fast lookup Map. This implementation still calls .hash for each and every call, which is also expensive, since it also walks the arrays to compute the hash. However, the equality check of the hash value is very fast, and net gain is significant. Upto a 15% increase of throughput.

Fixes #7772

Fixes #7798
2017-07-29 20:57:47 +00:00
..
benchmarks Fixes #7676 and generally improves the performance of org.logstash.StringInterpolation#evaluate by: 2017-07-25 18:29:10 +00:00
lib Performance: Use RubyArray.hash for metric's fast lookup key 2017-07-29 20:57:47 +00:00
locales Fix bug where hot threads did not work with duplicate names / add thread_id 2017-07-24 16:38:18 +00:00
spec #7690 Fix needless waiting by using an ArrayBlockingQueue 2017-07-28 06:08:29 +00:00
src Metrics: Fix RubyTimestamp serialization 2017-07-29 20:09:59 +00:00
.lock LIR UI (Read Only) (#6241) 2017-04-03 08:49:00 -04:00
build.gradle MINOR: Enable javac warnings 2017-07-13 10:40:46 +00:00
gemspec_jars.rb Fix ominous warning: jar coordinate ... already loaded 2017-07-12 20:50:21 +00:00
logstash-core.gemspec use jruby 9.1.9.0 2017-06-12 12:35:10 -04:00
settings.gradle merge feature/java_persistence into master 2016-11-01 17:13:23 -04:00