News for hackers. Stuff that matters.
Re:A Faster Alternative to Jq by messe on Friday March 27, 2026 @04:11AM (#47540125)
Now I'm really curious. What field are you in that ndjson files of that size are common?

I'm sure there are reasons against switching to something more efficient–we've all been there–I'm just surprised.

Re:A Faster Alternative to Jq by overfeed on Friday March 27, 2026 @04:22AM (#47540179)
> Now I'm really curious. What field are you in that ndjson files of that size are common?

I'm not OP,but structured JSON logs can easily result in humongous ndjson files, even with a modest fleet of servers over a not-very-long period of time.

Re:A Faster Alternative to Jq by messe on Friday March 27, 2026 @04:24AM (#47540197)
So what's the use case for keeping them in that format rather than something more easily indexed and queryable?

I'd probably just shove it all into Postgres, but even a multi terabyte SQLite database seems more reasonable.

Re:A Faster Alternative to Jq by carlmr on Friday March 27, 2026 @04:47AM (#47540329)
Replying here because the other comment is too deeply nested to reply.

Even if it's once off, some people handle a lot of once-offs, that's exactly where you need good CLI tooling to support it.

Sure jq isn't exactly super slow, but I also have avoided it in pipelines where I just need faster throughput.

rg was insanely useful in a project I once got where they had about 5GB of source files, a lot of them auto-generated. And you needed to find stuff in there. People were using Notepad++ and waiting minutes for a query to find something in the haystack. rg returned results in seconds.

Re:A Faster Alternative to Jq by messe on Friday March 27, 2026 @05:06AM (#47540453)
You make some good points. I've worked in support before, so I shouldn't have discounted how frequent "once-offs" can be.
Re:A Faster Alternative to Jq by paavope on Friday March 27, 2026 @04:35AM (#47540262)
The use case could be e.g. exactly processing an old trove of logs into something more easily indexed and queryable, and you might want to use jq as part of that processing pipeline
Re:A Faster Alternative to Jq by messe on Friday March 27, 2026 @04:38AM (#47540288)
Fair, but for a once-off thing performance isn't usually a major factor.

The comment I was replying to implied this was something more regular.

EDIT: why is this being downvoted? I didn't think I was rude. The person I responded to made a good point, I was just clarifying that it wasn't quite the situation I was asking about.

Re:A Faster Alternative to Jq by adastra22 on Friday March 27, 2026 @05:06AM (#47540451)
At scale, low performance can very easily mean "longer than the lifetime of the universe to execute." The question isn't how quickly something will get done, but whether it can be done at all.
Re:A Faster Alternative to Jq by messe on Friday March 27, 2026 @06:27AM (#47540930)
Good point. I said it above, but I'll repeat it here that I shouldn't have discounted how frequent once offs can be. I've worked in support before so I really should've known better
Re:A Faster Alternative to Jq by bigDinosaur on Friday March 27, 2026 @05:06AM (#47540460)
Certain people/businesses deal with one-off things every day. Even for something truly one-off, if one tool is too slow it might still be the difference between being able to do it once or not at all.