Commit 4b4d4cc9 authored by neverlord's avatar neverlord

pre-allocate only max_size()/2 elements

parent 9d9065a7
...@@ -202,7 +202,8 @@ class abstract_actor : public Base ...@@ -202,7 +202,8 @@ class abstract_actor : public Base
abstract_actor(Args&&... args) : Base(std::forward<Args>(args)...) abstract_actor(Args&&... args) : Base(std::forward<Args>(args)...)
, m_exit_reason(exit_reason::not_exited) , m_exit_reason(exit_reason::not_exited)
{ {
for (size_t i = 0; i < m_nodes.max_size(); ++i) // pre-allocate some nodes
for (size_t i = 0; i < m_nodes.max_size() / 2; ++i)
{ {
m_nodes.push_back(new mailbox_element); m_nodes.push_back(new mailbox_element);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment