6 ms·
To an extent, because it's extremely light. For the simpler kind of webapps, that is.
by jmonegro 17y ago
To an extent, because it's extremely light. For the simpler kind of webapps, that is.
- jamesbritt 17y agoI don't follow. Sinatra is light because it omits things. Rack is extremely light, too, lighter than Sinatra, but thats obviously because it omits even more things. If I were to build the same Web site for the same audience and expected traffic using Rails and Sinatra, would using Sinatra (as compared to Rails) reduce the need for what the OP described regarding caching, load balancing, and other methods of increasing performance? Perhaps it would, as would using Ramaze, or simply writing targeted Rack middleware, but the gains from using lighter tools such as these, as compared to Rails, is that you lose out on using many pre-existing libraries. And while Sinatra and Ramaze are faster than Rails I'm not so sure that they are so much faster that you'd see a big difference in trying to support heavy request loads. That said I still approach Web apps with the intent of using Ramaze because of it being light, very fast, and feature-complete, but if I find that there are some requirements that are well-matched to some existing Rails extension I'll take that route.
- jmonegro 17y agoAgain, to an extent. If the site is simple enough to do it in Sinatra without too many dependencies, etc., then yes, it would _at least_ postpone performance optimizations. My understanding is, however, that if the site is already simple, you may wind up not needing to do these improvements in Sinatra.