Problem: The Go json/v1 API we are using is at least 2X slower at unmarshaling than pretty much any other library. We do a lot of JSON unmarshaling between osquery results, vulnerability processing, etc.
- json/v2 realistically won't be out for at least a year. We could use it as is, but its API is unstable.
- I recommend we try https://github.com/goccy/go-json to speed up JSON unmarshal where needed. It is popular (used by 177K open source repos) and API-compatible with json/v1. Once json/v2 is out, we can start using that.
Example performance issue: #24390
Another example from an old vuln processing pprof run:

Problem: The Go json/v1 API we are using is at least 2X slower at unmarshaling than pretty much any other library. We do a lot of JSON unmarshaling between osquery results, vulnerability processing, etc.
Example performance issue: #24390
Another example from an old vuln processing pprof run:
