aboutsummaryrefslogtreecommitdiff
path: root/src/zencore
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-09-27 14:54:28 +0200
committerGitHub Enterprise <[email protected]>2024-09-27 14:54:28 +0200
commit59f920075f2efa7bb2c015d7da2a706413c68383 (patch)
treeaa69b9facb661496382ab60c466d62304b9ac671 /src/zencore
parentAdd instructions to README.md for upgrading third party libraries (#173) (diff)
downloadzen-59f920075f2efa7bb2c015d7da2a706413c68383.tar.xz
zen-59f920075f2efa7bb2c015d7da2a706413c68383.zip
reduce lock time for memcache trim (#171)
- Improvement: Faster memcache trimming - Reduce calculations while holding bucket lock for memcache trim analysis to reduce contention - When trimming memcache, evict 25% more than required to reduce frequency of trimming - When trimming memcache, don't repack memcache data vector, defer that to regular garbage collection - When trimming memcache, deallocate memcache buffers when not holding exclusive lock in bucket
Diffstat (limited to 'src/zencore')
-rw-r--r--src/zencore/include/zencore/iobuffer.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/zencore/include/zencore/iobuffer.h b/src/zencore/include/zencore/iobuffer.h
index 759a9b25e..15455dbaa 100644
--- a/src/zencore/include/zencore/iobuffer.h
+++ b/src/zencore/include/zencore/iobuffer.h
@@ -338,11 +338,7 @@ public:
};
inline IoBuffer() = default;
- inline IoBuffer(IoBuffer&& Rhs) noexcept
- {
- m_Core.Swap(Rhs.m_Core);
- Rhs.m_Core = NullBufferCore;
- }
+ inline IoBuffer(IoBuffer&& Rhs) noexcept : m_Core(std::move(Rhs.m_Core)) { Rhs.m_Core = NullBufferCore; }
inline IoBuffer(const IoBuffer& Rhs) = default;
inline IoBuffer& operator=(const IoBuffer& Rhs) = default;
inline IoBuffer& operator =(IoBuffer&& Rhs) noexcept