Skip to content

Instantly share code, notes, and snippets.

@RJVB
RJVB / 0_reuse_code.js
Created January 27, 2014 09:51 — forked from scoolen/0_reuse_code.js
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@RJVB
RJVB / Optimising_MP_registry.md
Last active September 22, 2024 11:41
Optimising the MacPorts registry (a bit)

A while back the question come up why MacPorts sometimes (and sometimes often) takes ages to return control to the user after the requested operations were all completed, and if anything could be done to reduce the duration.

The why question was easy to answer: it does a bit of registry database management. The registry of installed ports is stored in an sqlite3 database and MacPorts does a regular cleanup (VACUUM) on it to remove stale information.

The 2nd question was harder to answer, in part because the registry database requires an extension to be operated on with external tools and there was an explicit lack of willingness among the MP devs to help out with suggestions or instructions. After all, no one else complained so why would they...

I wouldn't be writing this if I did manage to answer the question and yes, the duration of that final limbo situation can be reduced considerably, possibly in a win-win situation with a somewhat smaller file size of the registry db. How much gain there is to be ha