Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several core paths.
This commit is contained in:
@@ -42,7 +42,7 @@ var Versions = []string{"v1"}
|
||||
var Codec runtime.Codec
|
||||
|
||||
func init() {
|
||||
jsonSerializer := json.NewSerializer(json.DefaultMetaFactory, api.Scheme, runtime.ObjectTyperToTyper(api.Scheme), true)
|
||||
jsonSerializer := json.NewSerializer(json.DefaultMetaFactory, api.Scheme, api.Scheme, true)
|
||||
Codec = versioning.NewCodecForScheme(
|
||||
api.Scheme,
|
||||
jsonSerializer,
|
||||
|
||||
Reference in New Issue
Block a user