goccy / go-json

Fast JSON encoder/decoder compatible with encoding/json for Go
MIT License
3.12k stars 148 forks source link

internal/encoder/vm_indent.Run is huge #481

Open swenson opened 1 year ago

swenson commented 1 year ago

I was doing some binary analysis, and noticed that on linux/amd64, the github.com/goccy/go-json/internal/encoder/vm_indent.Run function alone is 128,213 bytes in size, by far the largest function in any of our dependencies. This is a pretty big function for indentation for an indirect dependency.

It would be nice to trim down the weight of goccy, if possible.