json generation comparison on Rails 4.2 with jbuilder view partials and with just plain ruby hashes.
Ruby HTML CSS JavaScript CoffeeScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin Initial commit, comparing json response for reviews Apr 20, 2015
config Initial commit, comparing json response for reviews Apr 20, 2015
db Initial commit, comparing json response for reviews Apr 20, 2015
lib Initial commit, comparing json response for reviews Apr 20, 2015
log
public
vendor/assets Initial commit, comparing json response for reviews Apr 20, 2015
.gitignore
.ruby-version
Gemfile Initial commit, comparing json response for reviews Apr 20, 2015
Gemfile.lock
README.rdoc Initial commit, comparing json response for reviews Apr 20, 2015
Rakefile Initial commit, comparing json response for reviews Apr 20, 2015
config.ru

README.rdoc

README

A sample application to test performance of json generation done with *partial views and jbuilder* vs plain *ruby hashes*.

You can read more here: <link>

Notes:

To leave out database delays that just add noise over the comparison, there is a fake scope on the Review model to create fake the response. I have included the initial migrations I used, in case anyone finds them useful.

This code does NOT have tests or comments as it is not ment to be iterated/maintained over time. It is just to prove the point and let others try their approach.