Jason.decode/1 (native, spawned) vs NimblePool-based parser pool — 500 concurrent 1MB+ JSON payloads

You simply do not need a pool of parser processes. You don’t gain anything by parallelizing the parsing, simply call JSON.decode!. A pool of processes can help you if the thing you’re doing is IO bound, however, as I stated, JSON parsing is CPU bound and the work cannot be parallelized in that way. You will actually make performance worse by doing this.

3 Likes