Don't over-reserve map.

This commit is contained in:
Bartosz Taudul 2020-03-10 19:47:10 +01:00
parent aeb3bc410b
commit 377ed48416

View File

@ -1723,7 +1723,6 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
for( auto& t : m_data.threads ) total += t->samples.size(); for( auto& t : m_data.threads ) total += t->samples.size();
if( total != 0 ) if( total != 0 )
{ {
counts.reserve( total );
for( auto& t : m_data.threads ) for( auto& t : m_data.threads )
{ {
if( m_shutdown.load( std::memory_order_relaxed ) ) return; if( m_shutdown.load( std::memory_order_relaxed ) ) return;