lib/fluent/plugin/out_newrelic.rb in fluent-plugin-newrelic-1.1.9 vs lib/fluent/plugin/out_newrelic.rb in fluent-plugin-newrelic-1.1.10

- old
+ new

@@ -132,9 +132,11 @@ if compressed_payload.bytesize <= MAX_PAYLOAD_SIZE return [compressed_payload] end + compressed_payload = nil # Free for GC + if logs.length > 1 # we can split # let's split logs array by half, and try to create payloads again midpoint = logs.length / 2 first_half = get_compressed_payloads(logs.slice(0, midpoint)) second_half = get_compressed_payloads(logs.slice(midpoint, logs.length))