Working faster with large Middleman sites

I’m migrating a site with over 1000 pages to Middleman. As the number of pages goes up, I’ve noticed that working with Middleman, specially the Live Reload, becomes slower and slower. For example when making a change in a stylesheet it can take close to 30 seconds before the page in the browser actually changes.

To counter this, I have an Automator action (on a mac) that moves most of the files out of the site, leaving a slimmed down site that is much faster to work with. Changes in the stylesheet are now shown on the page almost instant. When done, another Automator action restore the site.

The advantage of using Automator is that it makes it easy to control what pages gets removed and what pages stays in the site – I can do this by age or using labels. The actual job is however done by a Ruby script inside the action, so if someone is interested but does not use a mac, it would be trivial to adapt it to the command line.

The actions, and their scripts, can be found at https://github.com/tommysundstrom/middleman-slim-the-site