diff --git a/go/mysql/collations/colldata/cached_size.go b/go/mysql/collations/colldata/cached_size.go index 36167c69d6d..b348baaaed8 100644 --- a/go/mysql/collations/colldata/cached_size.go +++ b/go/mysql/collations/colldata/cached_size.go @@ -19,10 +19,6 @@ package colldata import hack "vitess.io/vitess/go/hack" -type cachedObject interface { - CachedSize(alloc bool) int64 -} - func (cached *eightbitWildcard) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -63,10 +59,6 @@ func (cached *unicodeWildcard) CachedSize(alloc bool) int64 { if alloc { size += int64(48) } - // field charset vitess.io/vitess/go/mysql/collations/charset/types.Charset - if cc, ok := cached.charset.(cachedObject); ok { - size += cc.CachedSize(true) - } // field pattern []rune { size += hack.RuntimeAllocSize(int64(cap(cached.pattern)) * int64(4)) diff --git a/go/sqltypes/cached_size.go b/go/sqltypes/cached_size.go index 2a488f8450e..632c8249455 100644 --- a/go/sqltypes/cached_size.go +++ b/go/sqltypes/cached_size.go @@ -34,17 +34,9 @@ func (cached *Result) CachedSize(alloc bool) int64 { size += elem.CachedSize(true) } } - // field Rows [][]vitess.io/vitess/go/sqltypes.Value + // field Rows []vitess.io/vitess/go/sqltypes.Row { size += hack.RuntimeAllocSize(int64(cap(cached.Rows)) * int64(24)) - for _, elem := range cached.Rows { - { - size += hack.RuntimeAllocSize(int64(cap(elem)) * int64(32)) - for _, elem := range elem { - size += elem.CachedSize(false) - } - } - } } // field SessionStateChanges string size += hack.RuntimeAllocSize(int64(len(cached.SessionStateChanges))) diff --git a/go/vt/proto/query/cached_size.go b/go/vt/proto/query/cached_size.go index 735bd555e55..5b613317294 100644 --- a/go/vt/proto/query/cached_size.go +++ b/go/vt/proto/query/cached_size.go @@ -27,10 +27,6 @@ func (cached *BindVariable) CachedSize(alloc bool) int64 { if alloc { size += int64(96) } - // field unknownFields []byte - { - size += hack.RuntimeAllocSize(int64(cap(cached.unknownFields))) - } // field Value []byte { size += hack.RuntimeAllocSize(int64(cap(cached.Value))) @@ -52,10 +48,6 @@ func (cached *Field) CachedSize(alloc bool) int64 { if alloc { size += int64(160) } - // field unknownFields []byte - { - size += hack.RuntimeAllocSize(int64(cap(cached.unknownFields))) - } // field Name string size += hack.RuntimeAllocSize(int64(len(cached.Name))) // field Table string @@ -78,10 +70,6 @@ func (cached *QueryWarning) CachedSize(alloc bool) int64 { if alloc { size += int64(64) } - // field unknownFields []byte - { - size += hack.RuntimeAllocSize(int64(cap(cached.unknownFields))) - } // field Message string size += hack.RuntimeAllocSize(int64(len(cached.Message))) return size @@ -94,10 +82,6 @@ func (cached *Target) CachedSize(alloc bool) int64 { if alloc { size += int64(96) } - // field unknownFields []byte - { - size += hack.RuntimeAllocSize(int64(cap(cached.unknownFields))) - } // field Keyspace string size += hack.RuntimeAllocSize(int64(len(cached.Keyspace))) // field Shard string @@ -114,10 +98,6 @@ func (cached *Value) CachedSize(alloc bool) int64 { if alloc { size += int64(80) } - // field unknownFields []byte - { - size += hack.RuntimeAllocSize(int64(cap(cached.unknownFields))) - } // field Value []byte { size += hack.RuntimeAllocSize(int64(cap(cached.Value))) diff --git a/go/vt/proto/topodata/cached_size.go b/go/vt/proto/topodata/cached_size.go index d06ebd0d3f0..94b7fc6818c 100644 --- a/go/vt/proto/topodata/cached_size.go +++ b/go/vt/proto/topodata/cached_size.go @@ -27,10 +27,6 @@ func (cached *KeyRange) CachedSize(alloc bool) int64 { if alloc { size += int64(96) } - // field unknownFields []byte - { - size += hack.RuntimeAllocSize(int64(cap(cached.unknownFields))) - } // field Start []byte { size += hack.RuntimeAllocSize(int64(cap(cached.Start))) @@ -49,10 +45,6 @@ func (cached *ThrottledAppRule) CachedSize(alloc bool) int64 { if alloc { size += int64(80) } - // field unknownFields []byte - { - size += hack.RuntimeAllocSize(int64(cap(cached.unknownFields))) - } // field Name string size += hack.RuntimeAllocSize(int64(len(cached.Name))) // field ExpiresAt *vitess.io/vitess/go/vt/proto/vttime.Time diff --git a/go/vt/proto/vttime/cached_size.go b/go/vt/proto/vttime/cached_size.go index e34da16852c..62a6366ba3c 100644 --- a/go/vt/proto/vttime/cached_size.go +++ b/go/vt/proto/vttime/cached_size.go @@ -17,8 +17,6 @@ limitations under the License. package vttime -import hack "vitess.io/vitess/go/hack" - func (cached *Time) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) @@ -27,9 +25,5 @@ func (cached *Time) CachedSize(alloc bool) int64 { if alloc { size += int64(64) } - // field unknownFields []byte - { - size += hack.RuntimeAllocSize(int64(cap(cached.unknownFields))) - } return size }