1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

add info about streaming parser performance characteristics

This commit is contained in:
Kelly Brazil
2021-09-16 21:43:36 -07:00
parent df8387a1a9
commit 5288eb22aa
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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