Tuesday, June 28, 2011

Building atlas on macports takes forever - try disabling spotlight indexing

Last night I was trying to upgrade all my installed MacPorts programs to the latest versions, using the command

sudo port upgrade outdated

I noticed that the process seemed to take an incredibly long time building atlas. It got to this stage and nothing happened.


--->  Computing dependencies for atlas
--->  Building atlas

I left it for an extremely long time, however (>6 hours), and atlas still failed to build (1). I have a pretty fast 15" MacBook Pro (6,2 - 2.53 GHz Core i5 (dual core)), so this was surprising.

I ctrl-c'd and tried again, thinking that something might have gotten stuck. Then re-ran with the same results - build seemed to go hours without completing.

Then I noticed in Activity Monitor that none of the compile processes were actually taking much CPU. Something that was taking up CPU was mdutil, a process that does spotlight indexing.

So I disabled spotlight indexing using the following command (2):

sudo mdutil -a -i off
Afterwards things proceeded as I expected - the compile processes started taking up large amounts of CPU, and the atlas build finished within the hour.

It might not be related, but if your atlas build takes forever, give this a shot.



1) Similar issue that no one really had a solve for:

https://trac.macports.org/ticket/27600


2) Disabling spotlight: