1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-08 19:35:21 +02:00

chore: lazy-loaded version of goccy/go-json

- This uses a forked version of https://github.com/goccy/go-json, that
has [this pull request](https://github.com/goccy/go-json/pull/490)
applied. It reduces the heap memory usage by 8MiB (idle heap usage from
startup: 40126.59kB -> 32073.56kB). This should be generally safe to
replace as goccy/go-json doesn't see frequent updates and the other user
of this fork is grafana which is another big Go project.
- The only user of this library is minio, but having a configuration
with minio is not a common setup, AFAIK, so this is essentialy wasted
memory for most Forgejo instances. Having it lazy-loaded solves that
problem.
This commit is contained in:
Gusted 2024-11-10 02:21:28 +01:00
parent d2ba9806f3
commit 11667f07c5
No known key found for this signature in database
GPG key ID: FD821B732837125F
2 changed files with 4 additions and 2 deletions

2
go.mod
View file

@ -296,3 +296,5 @@ replace github.com/shurcooL/vfsgen => github.com/lunny/vfsgen v0.0.0-20220105142
replace github.com/nektos/act => code.forgejo.org/forgejo/act v1.21.5
replace github.com/mholt/archiver/v3 => code.forgejo.org/forgejo/archiver/v3 v3.5.1
replace github.com/goccy/go-json => github.com/grafana/go-json v0.0.0-20241106155216-71a03f133f5c