4 ms·
Would be interesting to see some simple benchmarks comparing a base JSON only Rails app with Rails::API.
by bretthopper 14y ago
Would be interesting to see some simple benchmarks comparing a base JSON only Rails app with Rails::API.
- steveklabnik2 14y agoThe problem with benchmarks is that they don't really correspond to reality. Your app is not a simple test app. Your site will not be running on my MacBook Air. Your users won't have the usage patterns my script does.
- sjtgraham 14y agoThis is true, but they're better than nothing.
- bretthopper 14y agoOf course. It's not about showing some absolute numbers that users can expect. It's just about showing the potential overhead of a full Rails app vs Rails::API. I'd think this would be a reason why people would chose Rails::API over just Rails. The README itself says Rails::API is faster, so not sure why a simple benchmark to back that up isn't a good idea. edit: It really boils down to another way to visualize the overhead vs just listing what's been removed.
- irahul 14y agoIMO you shouldn't do the benchmark. Let this project be a starting point for a Rails api project and/or a how to for people who want to customize Rails for their needs. "We are building an API. Rails has extra components which aren't used but might cause overhead. Here is how to remove it." I think that's a valid enough use-case.
- paulbjensen 14y agoI agree. In fact, what would be really cool is to have a Single Page App's front-end as a template spec against which to compare different framework's performances against, a bit like what TODO-MVC did with client-side JS frameworks.
- senthilnayagam 14y agoI have been using rails-api for over a month in a large project, this is port of a older rails app, empirical evidence app loads faster and memory footprint is small, as dependencies are less. I have made some additional changes, i use it with RABL, test suite is now separate and uses curb/faraday as API client. I am also considering repacking all my gems to make bundle install faster and a smaller size for standalone installations