pinojs / pino-elasticsearch

🌲 load pino logs into Elasticsearch
MIT License
179 stars 67 forks source link

replace `fast-json-parse` with JSON.parse() #62

Closed gr2m closed 4 years ago

gr2m commented 4 years ago

@mcollina states on https://github.com/mcollina/fast-json-parse#readme

The reason why this is fast is that try/catch inhibits the functions in which you use them to be optimized. This assumption holds true up to Node 6, from Node 7 and forward this module is not useful anymore.

pino-elasticsearch requires Node 10, so I wonder if you'd want to replace it with just JSON.parse()? Happy to send a PR if yes.

If not, what's the reason to keep fast-json-parse, I'd be curious

mcollina commented 4 years ago

send a PR, no real need