You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Which issue(s) this PR fixes**:
Fixes #
**What this PR does / why we need it**:
When dealing with long logs at fast, it might improve memory efficient
to clear the original strings used in string interpolation.

* config
```
<source>
@type tail
path "#{File.expand_path '~/tmp/access*.log'}"
pos_file "#{File.expand_path '~/tmp/fluentd/access.log.pos'}"
tag log
refresh_interval 5s
<parse>
@type none
</parse>
</source>
<match **>
@type file
path "#{File.expand_path '~/tmp/log'}"
</match>
```
* script to generate log data
```ruby
require "json"
path = File.expand_path("~/tmp/access.log")
File.open(path, "w") do |f|
loop do
log = { time: Time.now, message: "a" * 50 * 1024 }.to_json
f.puts log
sleep 0.0001
end
end
```
**Docs Changes**:
**Release Note**:
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
0 commit comments