diff options
author | innokentii <innokentii@yandex-team.com> | 2022-10-17 17:59:47 +0300 |
---|---|---|
committer | innokentii <innokentii@yandex-team.com> | 2022-10-17 17:59:47 +0300 |
commit | 1b07a19e808b6b3ba13119b1eef6e241688e01a1 (patch) | |
tree | 3f02cf2e174c50591e88ce0b616a3012ecdde257 /library/cpp | |
parent | 3717bf8db1cedcc16b1fcc364060220d72336734 (diff) | |
download | ydb-1b07a19e808b6b3ba13119b1eef6e241688e01a1.tar.gz |
Remove redundant TString conversion in blobstorage
remove redundant copying
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/actors/util/contiguous_data.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/cpp/actors/util/contiguous_data.h b/library/cpp/actors/util/contiguous_data.h index 8eda607711f..303d2df3a20 100644 --- a/library/cpp/actors/util/contiguous_data.h +++ b/library/cpp/actors/util/contiguous_data.h @@ -697,8 +697,15 @@ public: {} explicit TContiguousData(TString s) +#ifndef KIKIMR_TRACE_CONTIGUOUS_DATA_GROW : Backend(std::move(s)) +#endif { +#ifdef KIKIMR_TRACE_CONTIGUOUS_DATA_GROW + auto ss = NActors::TSharedData::Copy(s.data(), s.size()); + TBackTracingOwner::FakeOwner(ss, TBackTracingOwner::INFO_COPIED_STRING); + Backend = TBackend(std::move(ss)); +#endif auto span = Backend.GetData(); Begin = span.data(); End = Begin + span.size(); |