middleman/middleman — pull request #381 by bhollis (2012-04-24 07:43:16+00:00)
Title: Two speedups

Based on some profiling, these speedups can shave a few seconds off the startup time of `middleman build`.

* Refresh the sitemap as infrequently as possible
* Cache `Resource#metadata_for_path`, which is called frequently and can be expensive to calculate.

Interestingly, I found that just adding the `oj` JSON gem to my Gemfile gave the greatest speedup, knocking almost 10 seconds off my total build time, because it speeds up Uglifier. I'm leaving that tip for the guides though.