mojombo/jekyll — pull request #519 by lucagrulla (2012-03-04 00:32:40+00:00)
Title: performance improvements

I did some profiling and noticed how jekyll spends a lot of time in doing comparisons, namely Post comparison (via <=>).

Post comparison is actually mostly called from site_payload, that generates a on-demand hash containing (among others) the ordered list of posts. In methods where site_payload is called more than once I just introduced a local variable to reduce the multiple calls and the additional comparison.

Just this in my benchmark gives an improvement in the time needed to generate the site of a 20-25%(particularly useful for big site, with over 1000 between pages and posts).