Sha256: dc95846e332a4d97ca0f138cc5771934c1631a7f403e8ca7e24ea09a5eebf764

Contents?: true

Size: 603 Bytes

Versions: 23

Compression:

Stored size: 603 Bytes

Contents

require 'test_helper'
require 'benchmark'

Song = Struct.new(:title)


class SongCell < Cell::ViewModel
  self.view_paths = ['test']
  property :title

  def show
    render
  end
end

time = Benchmark.measure do
  Cell::ViewModel.cell(:song, nil, collection: 1000.times.collect { Song.new("Anarchy Camp") })
end

puts time

# 4.0
  # 0.310000   0.010000   0.320000 (  0.320382)

  # no caching of templates, puts
  #   0.570000   0.030000   0.600000 (  0.600160)

  # caching of templates
  #  0.090000   0.000000   0.090000 (  0.085652)

  # wed, 17.
  #   0.120000   0.010000   0.130000 (  0.127731)

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
cells-4.1.7 test/cell_benchmark.rb
cells-4.1.6 test/cell_benchmark.rb
cells-4.1.5 test/cell_benchmark.rb
cells-4.1.4 test/cell_benchmark.rb
cells-4.1.3 test/cell_benchmark.rb
cells-4.1.2 test/cell_benchmark.rb
cells-4.1.1 test/cell_benchmark.rb
cells-4.1.0 test/cell_benchmark.rb
cells-4.1.0.rc1 test/cell_benchmark.rb
cells-4.0.5 test/cell_benchmark.rb
cells-4.0.4 test/cell_benchmark.rb
cells-4.0.3 test/cell_benchmark.rb
cells-4.0.2 test/cell_benchmark.rb
cells-4.0.1 test/cell_benchmark.rb
cells-4.0.0 test/cell_benchmark.rb
cells-4.0.0.rc1 test/cell_benchmark.rb
cells-4.0.0.beta6 test/cell_benchmark.rb
cells-4.0.0.beta5 test/cell_benchmark.rb
cells-4.0.0.beta4 test/cell_benchmark.rb
cells-4.0.0.beta3 test/cell_benchmark.rb