<commit_before>class HomeController < ApplicationController

  def index
    if current_user
      @src_sets = SrcSet.active.most_recent(8)
      @src_images = SrcImage.without_image.includes(:src_thumb).owned_by(current_user).active.most_recent(6)
      @gend_images = GendImage.without_image.includes(:gend_thumb).owned_by(current_user).active.most_recent(6)
    else
      @src_sets = SrcSet.active.most_recent(16)
      @gend_images = GendImage.without_image.includes(:gend_thumb).owned_by(current_user).active.most_recent(16)
    end

  end
end<commit_msg>Optimize row counts for most common browser widths.<commit_after>class HomeController < ApplicationController

  PER_ROW = 7

  def index
    if current_user
      @src_sets = SrcSet.active.most_recent(PER_ROW)
      @src_images = SrcImage.without_image.includes(:src_thumb).owned_by(current_user).active.most_recent(PER_ROW)
      @gend_images = GendImage.without_image.includes(:gend_thumb).owned_by(current_user).active.most_recent(2 * PER_ROW)
    else
      @src_sets = SrcSet.active.most_recent(2 * PER_ROW)
      @gend_images = GendImage.without_image.includes(:gend_thumb).owned_by(current_user).active.most_recent(3 * PER_ROW)
    end
  end

end
{'fraction_non_alphanumeric': 0.09958847736625515, 'fraction_numerical': 0.00905349794238683, 'mean_word_length': 4.874396135265701, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7300355', 'n_tokens_mistral': 428, 'n_tokens_neox': 408, 'n_words': 53}