<html><head><title></title></head><body><!-- rte-version 0.2 9947551637294008b77bce25eb683dac --><div class="rte-style-maintainer" style="font-family: Arial; white-space: pre-wrap; font-size: small; color: rgb(0, 0, 0);"data-color="global-default" bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" bbg-font-family="normal">Works for me. Attached is a revised patch that incorporates your suggestions.<div><br></div><div>Thanks,</div><div>Matthew<br><div class="rte-style-maintainer" style="font-size: small; font-family: 'Courier New', Courier; color: rgb(0, 0, 0);"data-color="global-default" bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" bbg-font-family="fixed-width"><br><div class="bbg-rte-fold-content" data-header="From: nicholson@endlessm.com At: 07/08/16 19:19:15" data-digest="From: nicholson@endlessm.com At: 07/08/16 19:19:15" style=""><div class="bbg-rte-fold-summary">From: nicholson@endlessm.com At: 07/08/16 19:19:15</div><div>To: <a spellcheck="false" bbg-destination="mailto:mhanna21@bloomberg.net" href="mailto:mhanna21@bloomberg.net">MATTHEW HANNA (BLOOMBERG/ 731 LEX)</a>, <a spellcheck="false"bbg-destination="mailto:rte:bind" href="mailto:pkg-config@lists.freedesktop.org">pkg-config@lists.freedesktop.org</a><br>Subject: Re: [PATCH 1/1] Improve performance of package list expansion.<br></div></div><blockquote>That looks like a nice fix. I guess I only ever tested this with a small<br>set of packages. However, I think I'd like it reworked a bit. Since<br>there are only 2 callers, I'd prefer to have them create the hash table<br>and pass it to recursive_fill_list. Then you also don't need to create 2<br>versions of the static helper function. I also don't see a great reason<br>to change the function name, but I guess I don't feel that strongly<br>about that.<br><br>Thanks,<br>Dan<br><br>On Sun, 2016-06-19 at 12:57 +0000, Matthew Hanna (BLOOMBERG/ 731 LEX)<br>wrote:<br>> Thanks for the quick reply. Yes, I forgot to attach it. Should be<br>> attached now.<br>> <br>> Matthew<br>> <br>> From: <a spellcheck="false"bbg-destination="mailto:rte:bind" href="mailto:nicholson@endlessm.com" data-destination="mailto:rte:bind">nicholson@endlessm.com</a> At: Jun 18 2016 10:19:35<br>> To: MATTHEW HANNA (BLOOMBERG/ 731 LEX)<br>> Cc: <a spellcheck="false"bbg-destination="mailto:rte:bind" href="mailto:pkg-config@lists.freedesktop.org" data-destination="mailto:rte:bind">pkg-config@lists.freedesktop.org</a><br>> Subject: Re: [PATCH 1/1] Improve performance of package list<br>> expansion.<br>> Hi Matthew,<br>> I don't see the patch. Did you forget to attach it?<br>> Dan<br>> On Jun 18, 2016 6:31 AM, "Matthew Hanna (BLOOMBERG/ 731 LEX)" <mhanna2<br>> <a spellcheck="false"bbg-destination="mailto:rte:bind" href="mailto:1@bloomberg.net"data-destination="mailto:rte:bind">1@bloomberg.net</a>> wrote:<br>> > In practice, for library sets with a high degree of dependency,<br>> > iteration over the tree with revisiting results in significant slow<br>> > down at best and pkg-config failure due to memory exhaustion at<br>> > worst. This patch replaces the 'in_requires_chain' flag that halted<br>> > circular dependencies with a hash table that marks visited package<br>> > nodes. The resulting algorithm is equivalent to a topological<br>> > sort. Although a boolean flag on each node could be used to<br>> > implement the algorithm, resetting the flag to false can only be<br>> > done after the algorithm is complete, creating a bit of extra<br>> > bookkeeping. Instead, I chose to use a new hash table to record the<br>> > visits, reducing the bookkeeping to a call to<br>> > 'g_hash_table_destroy'.<br>> > <br>> > _______________________________________________<br>> > pkg-config mailing list<br>> > <a spellcheck="false"bbg-destination="mailto:rte:bind" href="mailto:pkg-config@lists.freedesktop.org" data-destination="mailto:rte:bind">pkg-config@lists.freedesktop.org</a><br>> > <a bbg-destination="rte:bind"spellcheck="false" href="https://lists.freedesktop.org/mailman/listinfo/pkg-config"data-destination="rte:bind">https://lists.freedesktop.org/mailman/listinfo/pkg-config</a><br>> > <br>> _______________________________________________<br>> pkg-config mailing list<br>> <a spellcheck="false"bbg-destination="mailto:rte:bind" href="mailto:pkg-config@lists.freedesktop.org" data-destination="mailto:rte:bind">pkg-config@lists.freedesktop.org</a><br>> <a bbg-destination="rte:bind"spellcheck="false" href="https://lists.freedesktop.org/mailman/listinfo/pkg-config"data-destination="rte:bind">https://lists.freedesktop.org/mailman/listinfo/pkg-config</a><br>> _______________________________________________<br>> pkg-config mailing list<br>> <a spellcheck="false"bbg-destination="mailto:rte:bind" href="mailto:pkg-config@lists.freedesktop.org" data-destination="mailto:rte:bind">pkg-config@lists.freedesktop.org</a><br>> <a bbg-destination="rte:bind"spellcheck="false" href="https://lists.freedesktop.org/mailman/listinfo/pkg-config"data-destination="rte:bind">https://lists.freedesktop.org/mailman/listinfo/pkg-config</a><br>_______________________________________________<br>pkg-config mailing list<br><a spellcheck="false"bbg-destination="mailto:rte:bind" href="mailto:pkg-config@lists.freedesktop.org" data-destination="mailto:rte:bind">pkg-config@lists.freedesktop.org</a><br><a bbg-destination="rte:bind"spellcheck="false" href="https://lists.freedesktop.org/mailman/listinfo/pkg-config"data-destination="rte:bind">https://lists.freedesktop.org/mailman/listinfo/pkg-config</a><br><br></blockquote></div></div></div></body></html>