registry: use more efficient json.Unmarshal on manifest
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
Activity
Created by: codecov[bot]
Codecov Report
Merging #8378 into master will not change coverage. The diff coverage is
0%
.@@ Coverage Diff @@ ## master #8378 +/- ## ======================================= Coverage 40.66% 40.66% ======================================= Files 1291 1291 Lines 69035 69035 Branches 6354 6354 ======================================= Hits 28070 28070 Misses 38366 38366 Partials 2599 2599
Impacted Files Coverage Δ ...d/frontend/internal/registry/extension_manifest.go 55.88% <0%> (ø)
Please register or sign in to reply