From ce82bb816b4c588ddf8623a6cb4b8f268683db91 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 2 Nov 2019 16:40:23 +0100 Subject: [PATCH] Use short ptr for find zone grouping data. Overall, the short ptr changes have the following effect on memory usage: big 9007 MB -> 8670 MB (96%) chicken 2007 MB -> 1932 MB (96%) drl-l-b 1383 MB -> 1304 MB (94%) q3bsp-mt 5252 MB -> 5059 MB (96%) long 5152 MB -> 4799 MB (93%) fi-big 4141 MB -> 4000 MB (96%) --- server/TracyView.cpp | 6 +++--- server/TracyView.hpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 1802e2ef..1cd544a8 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -8915,7 +8915,7 @@ void View::DrawFindZone() ImGui::End(); } -void View::DrawZoneList( const Vector& zones ) +void View::DrawZoneList( const Vector>& zones ) { ImGui::Columns( 3 ); ImGui::Separator(); @@ -8929,8 +8929,8 @@ void View::DrawZoneList( const Vector& zones ) ImGui::NextColumn(); ImGui::Separator(); - const Vector* zonesToIterate = &zones; - Vector sortedZones; + const Vector>* zonesToIterate = &zones; + Vector> sortedZones; if( m_findZone.tableSortBy != FindZone::TableSortBy::Starttime ) { diff --git a/server/TracyView.hpp b/server/TracyView.hpp index a3ab621a..56c659e1 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -156,7 +156,7 @@ private: flat_hash_map> GetCallstackFrameTreeBottomUp( const MemData& mem ) const; flat_hash_map> GetCallstackFrameTreeTopDown( const MemData& mem ) const; void DrawFrameTreeLevel( const flat_hash_map>& tree, int& idx ); - void DrawZoneList( const Vector& zones ); + void DrawZoneList( const Vector>& zones ); void DrawInfoWindow(); void DrawZoneInfoWindow(); @@ -388,7 +388,7 @@ private: struct Group { - Vector zones; + Vector> zones; int64_t time = 0; };