Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #664 from Jashank/faster_lsi

faster_lsi: Massively accelerate LSI performance.
  • Loading branch information...
commit faf5e44c47d800b62178b139b7246553033c272c 2 parents 2e76edd + 68333cd
@parkr parkr authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/jekyll/post.rb
View
7 lib/jekyll/post.rb
@@ -183,9 +183,12 @@ def related_posts(posts)
if self.site.lsi
self.class.lsi ||= begin
- puts "Running the classifier... this could take a while."
- lsi = Classifier::LSI.new
+ puts "Starting the classifier..."
+ lsi = Classifier::LSI.new(:auto_rebuild => false)
+ $stdout.print(" Populating LSI... ");$stdout.flush
posts.each { |x| $stdout.print(".");$stdout.flush;lsi.add_item(x) }
+ $stdout.print("\n Rebuilding LSI index... ")
+ lsi.build_index
puts ""
lsi
end
Please sign in to comment.
Something went wrong with that request. Please try again.