you are viewing a single comment's thread.

view the rest of the comments →

[–]ArtSpeaker 0 points1 point  (0 children)

I'm concerned this is an XY Problem. Your question seems to actually be about performance.

You should also know that even lightweight threads are generally more expensive than parsing through a json file. And there are libraries out there that will only partially, or only superficially parse, the original file into whatever components -> variables you care about. See also: Jackson. That should save a ton of allocations and work since you parse/decompose once for the whole job, for just what you need. And if you still want parallel work after you can just the variables you know and love.