<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 10, 2015, at 9:58 AM, Joshua Root &lt;<a href="mailto:jmr@macports.org" class="">jmr@macports.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">On 2015-1-11 00:18 , Clemens Lang wrote:<br class=""><blockquote type="cite" class=""><br class=""><br class="">----- On 10 Jan, 2015, at 12:28, Mojca Miklavec <a href="mailto:mojca@macports.org" class="">mojca@macports.org</a> wrote:<br class=""><br class=""><blockquote type="cite" class="">I already mentioned a while ago some annoying behaviour of macports:<br class=""> &nbsp;&nbsp;sudo port uninstall &lt;some port&gt;<br class="">(maybe also sudo clean) sometimes takes forever. I can uninstall 10<br class="">ports, but the time won't multiply by 10, it seems that there's only a<br class="">single very time consuming step somewhere in the process, but it's not<br class="">always exactly reproducible.<br class=""></blockquote><br class="">Might be the registry VACUUM at the end. Do you see the uninstall output in<br class="">normal speed and then it hangs before returning?<br class=""></blockquote><br class="">That is what generally takes a lot of time after uninstalls. Ideally we<br class="">would only vacuum when the amount of wasted space reaches a certain<br class="">significant level, but that would not make it any quicker when it does<br class="">happen, probably the opposite in fact. Not sure if we could add a<br class="">progress indicator either.<br class=""></div></blockquote></div><br class=""><div class="">We could check the ratio of free pages to total pages and VACUUM only when we reach a certain threshold. This would be VACUUM to recover unused space, but not necessarily to eliminate fragmentation. In general, I’d think VACUUM always takes about the same amount of time, given the same size of data: the algorithm is that a new file is created, and tables are copied into it one by one, I believe.</div><div class=""><br class=""></div><div class="">See pragmas for&nbsp;<a href="https://sqlite.org/pragma.html#pragma_freelist_count" class="">freelist_count</a>&nbsp;and&nbsp;<a href="https://sqlite.org/pragma.html#pragma_page_count" class="">page_count</a>.</div><div class=""><br class=""></div><div class="">James</div><div class=""><br class=""></div></body></html>