Skip to content

Piping large outputs seems extremely slow or doesn't work at all.  #595

@empath75

Description

@empath75

kubectl get pods -o yaml | from-yaml
is extremely slow -- on the order of 30 seconds to a minute or so to spit out any output, and it only captures part of it.

kubectl get pods -o json | from-json

Never outputs anything at all. If I hit control-c, I get:

- shell:1:28
1 |  kubectl get pods -o json | from-json
  |                             ^^^^^^^^^ input cannot be parsed as JSON
- shell:1:1
1 |  kubectl get pods -o json | from-json
  |  ------- value originates from here

Doesn't work piping to jq in nushell either. Seems like piping might hit a buffer or something and then stop?

~/nushell>  kubectl get pods -o json | jq
^Cparse error: Unfinished JSON term at EOF at line 1538, column 20
/Users/uye976/Downloads/nushell>  kubectl get pods -o json | jq
^Cparse error: Unfinished JSON term at EOF at line 1538, column 20

Works in less than a second piping to jq in bash.
the output of that command is 23,000 lines of json, fwiw.

130 ❯ kubectl get pods -o json | wc -l
   23207

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions