Skip to content

registry: use more efficient json.Unmarshal on manifest

Administrator requested to merge core/json-unmarshal into master

Created by: keegancsmith

I took a random trace of sourcegraph.com, and this was the largest use of CPU. There are more optimizations we can make here, but the simple change is to just use a more efficient unmarshaller. I validated that all data in postgres is normal json (instead of jsonc). Additionally the column type is jsonb, so it should always be conformant json.

I also checked how often we need to blend in the URL (the purpose of this function). The answer is most of the time.

Part of https://github.com/sourcegraph/sourcegraph/issues/7544

Merge request reports

Loading