Permalink
Browse files

avoiding to call site_payload one time per each post and page. Speed …

…site creation up of a 20%.
  • Loading branch information...
1 parent 3056953 commit 7d88f72409dfe5d8d11f336c85e6dbea7861f416 @lucagrulla lucagrulla committed with tmm1 Mar 3, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/jekyll/site.rb
View
@@ -195,12 +195,13 @@ def generate
#
# Returns nothing.
def render
+ payload = site_payload
self.posts.each do |post|
- post.render(self.layouts, site_payload)
+ post.render(self.layouts, payload)
end
self.pages.each do |page|
- page.render(self.layouts, site_payload)
+ page.render(self.layouts, payload)
end
self.categories.values.map { |ps| ps.sort! { |a, b| b <=> a } }

1 comment on commit 7d88f72

Good catch

Please sign in to comment.