diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2019-03-27 00:06:00 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2019-03-27 00:06:00 +0300 |
commit | a632d9e2a3f3af6ddecc92d491a713eb5e42dcd8 (patch) | |
tree | 73ad214d69d5f39c394264e1feb784c184018ec5 /server/TracyWorker.hpp | |
parent | 11f4dcbf1ed8d2854813fbc013e2698fe85379e4 (diff) |
Add zone vector cache.
Zone children will be now collected in staging vectors. When the zone is
ended (and no children can be added anymore to it), a size-fitted vector
is allocated using slab allocation. The over-allocated vector is then
put into cache for use in future zones.
This is only active for vectors <= 8192 elements, or 64 KB (chosen
arbitrarily), to reduce time spent on copying memory.
Overall, this change should have the following effects:
- System memory allocation pressure reduction, due to re-usage of
vectors, which eliminates the need for constant growth.
- Reduction of memory usage, because children vectors are now fitted to
required size.
- Slight increase of zone processing time, due to memory copying?
Diffstat (limited to 'server/TracyWorker.hpp')
-rw-r--r-- | server/TracyWorker.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 5168cf66..748a3da5 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -178,6 +178,8 @@ private: Vector<Vector<ZoneEvent*>> zoneChildren; Vector<Vector<GpuEvent*>> gpuChildren; + Vector<Vector<ZoneEvent*>> zoneVectorCache; + CrashEvent crashEvent; }; |