Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ccocchi/rabl-benchmark
A sample rails project to compare rabl and rabl-rauks gem
https://github.com/ccocchi/rabl-benchmark
Last synced: 8 days ago
JSON representation
A sample rails project to compare rabl and rabl-rauks gem
- Host: GitHub
- URL: https://github.com/ccocchi/rabl-benchmark
- Owner: ccocchi
- Created: 2012-03-30T16:22:49.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2017-08-02T13:02:51.000Z (over 7 years ago)
- Last Synced: 2024-10-21T15:58:23.036Z (17 days ago)
- Language: Ruby
- Homepage:
- Size: 54.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rabl benchmark #
This Rails application is used to benchmark two gems : `rabl` and `rabl-rails`, both that allows to write API representation for your models as views.
## Tests
Use `rake test TEST=` to launch the tests
Tests are under `test/performance/`. Rendering cases tested are :
* single model without extends
* single model with extend
* collection of 30 objects without extend
* collection of 30 objects with extend
* deep nesting models
* single model with partialTests use JSON format.
More tests cases are welcome
## Results
`rabl-rails` gem is ~5% faster when rendering single object, but can be **50% faster** when rendering collection with extends (one of the most used case through applications).
`rabl-rails` alse use **less memory** globally, around 10%, with **50%** less memory used on collection with extend.
See [BENCHMARK](http://github.com/ccocchi/rabl-benchmark/blob/master/BENCHMARK) for details.
## Helping out
If you want to provide another benchmark tests, please fork the code, fix in your local project and then send a pull request on github.
## Author
Christopher Cocchi-Perrier - [ccocchi](http://github.com/ccocchi) | [@ccocchi](http://twitter.com/ccocchi)