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