Speedboost with a SSD for my MacBook Pro

After reading a lot about SSDs and the speedup they can give to a computer, I decided to get one myself. A fellow developer added a SSD to his late 2006 MacBook Pro, wrote about it and gave lots of tips. Since I have a late 2008 Unibody MacBook Pro, I had to get a slightly different adapter to replace the SuperDrive with a HDD in the optical drive bay from NewmodeUS.

At first I wanted to order the Intel X-25M 80GB in June for ~330 Euro. Shortly after ordering it, the supplier told me it would take 2 weeks to deliver. Due to an unexpected invoice I decided to cancel the order. I’m glad I did. I now got the next generation Intel X-25M 160GB Postville for ~400 Euro.

Thanks to the guides from iFixIt and the new enclosures of the Unibody Macs, the replacement was quite easy.

Some tips for the replacement:

After removing the 8 screws of the bottom plate, lift it straight up and don’t tilt it too much. There are latches on the left and right which open with slight force. If you tilt the bottom plate, then you may bend the ventilation grille at the back, or damage something with it. I don’t think it’s a real danger, just be careful.

The black cable going above the SuperDrive to the back uses some adhesive, lift it off carefully.

The plug of the black cable needs to be pulled out sideways, I used a knife, but better is to use something made of plastic. I pulled it off by pushing it sideways alternating on both sides.

I had to leave off the upper half of the optical bay adapter or it wouldn’t have fit.

I only used one screw near the logic board to secure the adapter, since the SuperDrive has additional screw holes which aren’t on the adapter. To compensate, I fitted something between subwoofer (the black plastic thing below the SuperDrive) and the adapter to keep it in place.

At first I had replaced the HDD with the SSD and put the HDD in the optical bay adapter. That was a very tight fit and the HDD was much louder than before, because the noise goes through the DVD slot and the ventilation grille. I did this because I had read that the deep sleep mode doesn’t work when using the drive in the optical bay as the boot drive. After a while I got really annoyed by the noise and I switched the HDD and SSD. Unfortunately I can confirm that deep sleep doesn’t work if the boot drive is in the optical bay! For me it’s the lesser evil though. Maybe Snow Leopard will fix this, I hope to know soon 🙂

Once I had everything in place, I booted up the computer and held “Alt” after the startup sound to select the other disk as the boot device. I then used SuperDuper! to copy the OS from the HDD to the SSD (except for some large folders like “Music” and “Movies”. After selecting the new drive as the startup drive in the system preferences, I rebooted …

I watched in awe while the system booted up in mere seconds, I logged in and all the icons in the menu bar warped in, the QuickSilver logo came and went in a second and the system was ready after about 30 seconds total since the restart!

Other places I really notice the SSD speedup are the following:

  • Mail.app starts up almost instantly and opening a folder with thousands of mails is a breeze now.
  • Opera (which I use for reading newsgroups) starts in just a few seconds instead of churning along. Updating the newsgroups also takes a fraction of the time before and is mostly limited by the internet connection now.
  • Searching with Spotlight is much faster, especially in Mail.app, where I sometimes don’t notice that all mails have been searched instead of only the current folder.
  • QuickSilver is much more responsive.
  • Search in Project with TextMate is much better (but still not as fast as ack on the HDD).
  • Opening lots of images in iPhoto or Aperture is much faster
  • In general I almost never experience short lags or delays anymore as I did before.

Oh and if the HDD goes to sleep the MBP is now really quiet, unless you run something CPU intensive and the fans go on 🙂

Published in: on August 28, 2009 at 10:49 am  Comments (6)  

Keep trac of your subversion location

Many people use trac and Subversion together. Inside trac you can browse the contents of the Subversion repository. There is a plugin to link from that browser to your actual Subversion repository called SubversionLocationPlugin.

For the other way around you can use the following XSLT. Most of it just recreates the default Subversion look. The interesting part is the <xsl:element name="a"> in <xsl:template match="index">. There the link is created and it’s the place where you can set your own URL of your trac instance (the trac_prefix variable). To use this file, you add the SVNIndexXSLT option (see “Customizing the look” in the Subversion book) into you Apache configuration and set it to the url under which the file is accessible.

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html"/>
  <xsl:template match="*"/>
  <xsl:template match="svn">
    <html>
      <head>
        <title>
          Revision <xsl:value-of select="index/@rev"/>:
          <xsl:value-of select="index/@path"/>
        </title>
      </head>
      <body>
        <xsl:apply-templates/>
        <hr noshade="noshade"/>
        <em>Powered by </em>
        <xsl:element name="a">
          <xsl:attribute name="href">
            <xsl:value-of select="@href"/>
          </xsl:attribute>
          <xsl:text>Subversion</xsl:text>
        </xsl:element>
        <xsl:text> </xsl:text>
        <xsl:value-of select="@version"/>.
      </body>
    </html>
  </xsl:template>
  <xsl:template match="index">
    <xsl:element name="a">
      <xsl:variable name="trac_prefix" select="'https://dev.example.com/browser'"/>
      <xsl:attribute name="href">
        <xsl:value-of select="concat($trac_prefix, @path)"/>
      </xsl:attribute>
      Jarn-Trac Location
    </xsl:element>
    <h2>
      Revision <xsl:value-of select="@rev"/>:
      <xsl:value-of select="@path"/>
    </h2>
    <ul>
      <xsl:apply-templates select="updir"/>
      <xsl:apply-templates select="dir"/>
      <xsl:apply-templates select="file"/>
    </ul>
  </xsl:template>
  <xsl:template match="updir">
    <li><a href="..">..</a></li>
  </xsl:template>
  <xsl:template match="dir">
    <li>
      <xsl:element name="a">
        <xsl:attribute name="href">
          <xsl:value-of select="@href"/>
        </xsl:attribute>
        <xsl:value-of select="@name"/>
        <xsl:text>/</xsl:text>
      </xsl:element>
    </li>
  </xsl:template>
  <xsl:template match="file">
    <li>
      <xsl:element name="a">
        <xsl:attribute name="href">
          <xsl:value-of select="@href"/>
        </xsl:attribute>
        <xsl:value-of select="@name"/>
      </xsl:element>
    </li>
  </xsl:template>
</xsl:stylesheet>

The following XSLT is slightly more complex. It has an added <xsl:choose> part which adds links to customer specific trac instances.

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html"/>
  <xsl:template match="*"/>
  <xsl:template match="svn">
    <html>
      <head>
        <title>
          Revision <xsl:value-of select="index/@rev"/>:
          <xsl:value-of select="index/@path"/>
        </title>
      </head>
      <body>
        <xsl:apply-templates/>
        <hr noshade="noshade"/>
        <em>Powered by </em>
        <xsl:element name="a">
          <xsl:attribute name="href">
            <xsl:value-of select="@href"/>
          </xsl:attribute>
          <xsl:text>Subversion</xsl:text>
        </xsl:element>
        <xsl:text> </xsl:text>
        <xsl:value-of select="@version"/>.
      </body>
    </html>
  </xsl:template>
  <xsl:template match="index">
    <xsl:element name="a">
      <xsl:variable name="trac_prefix" select="'https://dev.example.com/browser'"/>
      <xsl:attribute name="href">
        <xsl:value-of select="concat($trac_prefix, @path)"/>
      </xsl:attribute>
      Jarn-Trac Location
    </xsl:element>
    <xsl:choose>
      <xsl:when test="starts-with(@path, '/customers/foo')">
        -
        <xsl:element name="a">
          <xsl:variable name="trac_prefix" select="'https://trac.example.com/foo/browser'"/>
          <xsl:attribute name="href">
            <xsl:value-of select="concat($trac_prefix, substring-after(@path, '/customers/foo'))"/>
          </xsl:attribute>
          Foo-Trac Location
        </xsl:element>
      </xsl:when>
      <xsl:when test="starts-with(@path, '/customers/bar')">
        -
        <xsl:element name="a">
          <xsl:variable name="trac_prefix" select="'https://trac.example.com/bar/browser'"/>
          <xsl:attribute name="href">
            <xsl:value-of select="concat($trac_prefix, substring-after(@path, '/customers/bar'))"/>
          </xsl:attribute>
          Bar-Trac Location
        </xsl:element>
      </xsl:when>
    </xsl:choose>
    <h2>
      Revision <xsl:value-of select="@rev"/>:
      <xsl:value-of select="@path"/>
    </h2>
    <ul>
      <xsl:apply-templates select="updir"/>
      <xsl:apply-templates select="dir"/>
      <xsl:apply-templates select="file"/>
    </ul>
  </xsl:template>
  <xsl:template match="updir">
    <li><a href="..">..</a></li>
  </xsl:template>
  <xsl:template match="dir">
    <li>
      <xsl:element name="a">
        <xsl:attribute name="href">
          <xsl:value-of select="@href"/>
        </xsl:attribute>
        <xsl:value-of select="@name"/>
        <xsl:text>/</xsl:text>
      </xsl:element>
    </li>
  </xsl:template>
  <xsl:template match="file">
    <li>
      <xsl:element name="a">
        <xsl:attribute name="href">
          <xsl:value-of select="@href"/>
        </xsl:attribute>
        <xsl:value-of select="@name"/>
      </xsl:element>
    </li>
  </xsl:template>
</xsl:stylesheet>

I hope this is useful for some people. Since I’ve never used XSLT before and I struggled quite a bit with building these, I would love some feedback on my solution and possible improvements or simplifications.

Published in: on August 9, 2009 at 11:09 am  Leave a Comment