Lately I’ve become increasingly frustrated at the time I need to wait when my laptop boots up onto the desktop. There is a period of lag where you can’t really do anything. If you launch an application it will bounce and bounce on the dock for what feels like ages.
With a little investigative work I uncovered that Spotlight is reindexing after every startup. I can’t remember if Spotlight did this before Mavericks, but it is quite annoying. The period of lag seems to be connected to Spotlight doing it’s thing.
So what to do? With Spotlight in my sights I turned to Google and tried to find if people had similar problems and if there was an easy fix. Unfortunately with Mavericks being so new and Spotlight being such a long standing feature it was tough to find any relevant information.
Left to my own devices I tried to see if I could McGyver myself a solution.
Step 1 –
I went into System Preferences and to the Spotlight panel. I then selected the “Privacy” tab. On this tab you can add items that Spotlight will exclude. If you have a folder called “State Secrets” this is the place you want to drop it so it doesn’t come up in Spotlight results. I added all of my hard disks to the list, including the computers main hard disk (Macintosh HD).
By adding all disks to the privacy list Spotlight will be limited to dictionary and internet searches. If you never use Spotlight you can leave everything like this and the battle is won.
Step 2 –
Since I actually do use Spotlight I was inclined to continue in my quest. I fired up Disk Utility and a ran repair on all my disks. I then shut down and restarted my laptop. I then fired up the Terminal app and used the following commands, the first purge old indexes and then remove any stray traces of the Spotlight indexes:
Purge old indexes:
sudo mdutil -E /
Remove any possible traces of index left:
sudo rm -rf /.Spotlight-V100/* sudo rm -rf /var/folders/*
Step 3 –
With Spotlight turned off and all old indexes removed I went back to System Preferences and to the Spotlight panel. I removed the Macintosh HD from the list of excluded items. I decided to keep the external hard drives excluded as I often am working on the go without them attached, which might ultimately slow things down as Spotlight looks for them.
Spotlight then began to index the hard disk at which point I left it do it’s thing and went for coffee.
The Result –
My completely unscientific opinion is that all this helped and the lag from when the desktop appears to when I can begin to work is reduced. At least for the time being. It’s hard to say what exactly did it. Perhaps rebuilding the index, perhaps removing my external drives from indexing. Maybe it was something completely unrelated.
For the time being I’ll chalk this one up as a win.