From 5288eb22aadbbc1005b16428b94d2b07e9a75e3c Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Thu, 16 Sep 2021 21:43:36 -0700 Subject: [PATCH] add info about streaming parser performance characteristics --- README.md | 2 +- templates/readme_template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 100cf557..b867938f 100644 --- a/README.md +++ b/README.md @@ -222,7 +222,7 @@ JC_COLORS=default,default,default,default ``` ### Streaming Parsers -Most parsers load all of the data from STDIN, parse it, then output the entire JSON document serially. There are some streaming parsers (e.g. `ls-s` and `ping-s`) that start processing and outputing the data line-by-line as [JSON Lines](https://jsonlines.org/) (aka [NDJSON](http://ndjson.org/)) while it is being received from STDIN. Streaming parsers have slightly different behavior than standard parsers as outlined below. +Most parsers load all of the data from STDIN, parse it, then output the entire JSON document serially. There are some streaming parsers (e.g. `ls-s` and `ping-s`) that start processing and outputing the data line-by-line as [JSON Lines](https://jsonlines.org/) (aka [NDJSON](http://ndjson.org/)) while it is being received from STDIN. This can significantly reduce the amount of memory required to parse large amounts of command output (e.g. `ls -lR /`) and can sometimes process the data quicker. Streaming parsers have slightly different behavior than standard parsers as outlined below. > Note: Streaming parsers cannot be used with the "magic" syntax diff --git a/templates/readme_template b/templates/readme_template index f6653b0e..f948d0b9 100644 --- a/templates/readme_template +++ b/templates/readme_template @@ -147,7 +147,7 @@ JC_COLORS=default,default,default,default ``` ### Streaming Parsers -Most parsers load all of the data from STDIN, parse it, then output the entire JSON document serially. There are some streaming parsers (e.g. `ls-s` and `ping-s`) that start processing and outputing the data line-by-line as [JSON Lines](https://jsonlines.org/) (aka [NDJSON](http://ndjson.org/)) while it is being received from STDIN. Streaming parsers have slightly different behavior than standard parsers as outlined below. +Most parsers load all of the data from STDIN, parse it, then output the entire JSON document serially. There are some streaming parsers (e.g. `ls-s` and `ping-s`) that start processing and outputing the data line-by-line as [JSON Lines](https://jsonlines.org/) (aka [NDJSON](http://ndjson.org/)) while it is being received from STDIN. This can significantly reduce the amount of memory required to parse large amounts of command output (e.g. `ls -lR /`) and can sometimes process the data quicker. Streaming parsers have slightly different behavior than standard parsers as outlined below. > Note: Streaming parsers cannot be used with the "magic" syntax