Boost C++ Libraries: Ticket #7657: Serious performance and memory consumption hit if condition_variable methods condition notify_one or notify_all is used repeatedly https://svn.boost.org/trac10/ticket/7657 <p> platform: Win32, MSVS11 </p> <p> condition_variable::generations member contains list of basic_cv_list_entry instances. As notify_one or notify_all is called, each instance member release is called, setting basic_cv_list_entry::notified member to true. There is no code which set basic_cv_list_entry::notified to false again, so the entry stays notified forever. </p> <p> Items from condition_variable::generations are deleted only when there are no waiters for the entry. The waiters are removed in entry_manager::~entry_manager. New addition to 1.52 version is that waiter is removed only if the entry is not notified (line 198 thread/win32/condition_variable.hpp). As result, new entries are added for every get_wait_entry() call, which means for every wait call (as waiter can be added only to unnotified entry, which is the same story all over again), condition_variable::generations vector grows infinitely, consuming memory and processor time for useless searches for entries that could be removed. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7657 Trac 1.4.3 Petr Dannhofer <petr.dannhofer@…> Thu, 08 Nov 2012 10:38:43 GMT <link>https://svn.boost.org/trac10/ticket/7657#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7657#comment:1</guid> <description> <p> proposed patch: remove if(! entry-&gt;is_notified()) condition from ~entry_manager() </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Thu, 08 Nov 2012 18:39:48 GMT</pubDate> <title>owner, status changed https://svn.boost.org/trac10/ticket/7657#comment:2 https://svn.boost.org/trac10/ticket/7657#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Thu, 08 Nov 2012 18:52:09 GMT <link>https://svn.boost.org/trac10/ticket/7657#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7657#comment:3</guid> <description> <p> Hi, I added this patch to solve <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7461" title="#7461: Bugs: detail::win32::ReleaseSemaphore may be called with count_to_release ... (closed: fixed)">#7461</a>, but unfortunately it introduces a regression. I will rollback it and then take the time to analyze what is happening. </p> <p> Thanks for the report. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Thu, 08 Nov 2012 20:27:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7657#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7657#comment:4</guid> <description> <p> Committed in trunk revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/81254" title="Thread: rollback to manage with #7657">[81254]</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 10 Nov 2012 01:29:02 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/7657#comment:5 https://svn.boost.org/trac10/ticket/7657#comment:5 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.53.0</span> </li> </ul> Ticket viboes Sat, 01 Dec 2012 11:48:36 GMT summary changed https://svn.boost.org/trac10/ticket/7657#comment:6 https://svn.boost.org/trac10/ticket/7657#comment:6 <ul> <li><strong>summary</strong> <span class="trac-field-old">Serious performance and memory consuption hit if condition_variable methods condition notify_one or notify_all is used repeatedly</span> → <span class="trac-field-new">Serious performance and memory consumption hit if condition_variable methods condition notify_one or notify_all is used repeatedly</span> </li> </ul> Ticket viboes Sun, 02 Dec 2012 10:45:01 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7657#comment:7 https://svn.boost.org/trac10/ticket/7657#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Committed revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/81667" title="Thread: merge from trunk 1.53">[81667]</a>. </p> Ticket