diff options
author | tea-mur <[email protected]> | 2025-08-26 16:02:52 +0300 |
---|---|---|
committer | tea-mur <[email protected]> | 2025-08-26 16:41:18 +0300 |
commit | 6d59cbff3b4093ea971e87b82450935cc06918ef (patch) | |
tree | 4aa7e1aad9fb848885cbd0df21c1099a961b473c | |
parent | b142a8ffb787fc94482c7504ff7fb0ed820a4a28 (diff) |
Removed second SpaceUsed call in RegisterExtraSpace
В(https://nda.ya.ru/t/4LNnVrrS7J7kXu обнаружили, что SpaceUsed потребляет много cpu: <https://nda.ya.ru/t/ly5u7IBc7J7kXv>
commit_hash:d29f21b29ed7bfab9571f5f3dcc3476e4260bffd
-rw-r--r-- | yt/yt/core/misc/protobuf_helpers-inl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yt/yt/core/misc/protobuf_helpers-inl.h b/yt/yt/core/misc/protobuf_helpers-inl.h index d3ab884959a..49639138286 100644 --- a/yt/yt/core/misc/protobuf_helpers-inl.h +++ b/yt/yt/core/misc/protobuf_helpers-inl.h @@ -612,7 +612,7 @@ void TRefCountedProto<TProto>::RegisterExtraSpace() auto spaceUsed = TProto::SpaceUsed(); YT_ASSERT(static_cast<size_t>(spaceUsed) >= sizeof(TProto)); YT_ASSERT(ExtraSpace_ == 0); - ExtraSpace_ = TProto::SpaceUsed() - sizeof(TProto); + ExtraSpace_ = spaceUsed - sizeof(TProto); auto cookie = GetRefCountedTypeCookie<TRefCountedProto<TProto>>(); TRefCountedTrackerFacade::AllocateSpace(cookie, ExtraSpace_); } |