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
formatter_json: use JSON as fallback parser instead of Yajl for performance (#4835)
**Which issue(s) this PR fixes**:
Fixes #
**What this PR does / why we need it**:
Recently, Ruby's json has incredible performance improvements.
It might be faster than oj gem.
So, I think json is a suitable as fallback.
This is similar with #4813
* Before
* It spent 70.708872503 sec to handle 10 GB file
* After
* It spent 54.428017716 sec to handle 10 GB file
* config
```
<source>
@type tail
path "#{File.expand_path('~/tmp/fluentd/access*.log')}"
pos_file "#{File.expand_path('~/tmp/fluentd/access.log.pos')}"
tag log
read_from_head true
<parse>
@type none
</parse>
</source>
<match **>
@type file
path "#{File.expand_path('~/tmp/fluentd/output/log')}"
# use formatter_json
format json
</match>
```
**Docs Changes**:
**Release Note**:
---------
Signed-off-by: Shizuo Fujita <[email protected]>
0 commit comments