15

I need to scan very large JSONL files efficiently and am considering a parallel grep-style approach over line-delimited text.

Would love to hear how you would design it.

you are viewing a single comment's thread
view the rest of the comments
[-] bizdelnick@lemmy.ml 0 points 6 days ago

Sorry, I missed that L, and I've never heard about JSONL before (although worked with JSON logs that are effectively JSONL). So, well, you may use grep, however it can be inefficient (depends on regex engine and how good you are in regexes). It is also easy to make a mistake if you are not very proficient in regexes. So I'd prefer using JSON parser (jq or another, maybe lower level if performance matters) over grep anyway.

[-] Vulwsztyn@programming.dev 1 points 4 days ago

parsing will make it orders of magnitude slower

[-] bizdelnick@lemmy.ml 1 points 3 days ago

It will not if your parser is not overcomplicated and does not populate some huge structures with data. You only need to find tokens and compare them with field names and values you are looking for. Regexes are slower and don't allow processing escaped characters correctly.

this post was submitted on 30 Mar 2026
15 points (100.0% liked)

Programming

26384 readers
379 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS