distribution/registry
Aaron Lehmann 853e2e92d8 Do not recreate mux router for each incoming request
(*App).context, called in the HTTP handler on each request, creates a
URLBuilder, which involves calling Router(). This shows up in profiles a
hot spot because it involves compiling the regexps which define all the
routes. For efficiency, cache the router and return the same object each
time.

It appears to be safe to reuse the router because GetRoute is the only
method ever called on the returned router object.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2022-07-08 14:17:17 -07:00
..
api Do not recreate mux router for each incoming request 2022-07-08 14:17:17 -07:00
auth go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
client Add tag delete API 2021-05-27 23:27:02 +01:00
handlers fix go check issues 2021-11-15 17:31:33 +08:00
listener [Server] Listen and serve on a unix socket 2015-05-11 16:00:14 +03:00
middleware go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
proxy disable insecure cipher suites 2022-01-25 17:18:44 +08:00
storage Merge pull request #3622 from ddelange/patch-1 2022-04-26 10:23:14 +01:00
doc.go Move initialization code from main.go to the registry package 2015-09-09 14:39:31 -07:00
registry.go disable insecure cipher suites 2022-01-25 17:18:44 +08:00
registry_test.go disable insecure cipher suites 2022-01-25 17:18:44 +08:00
root.go go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00