3 ms·
That's a false dichotomy, especially for most Rails applications, and one that can easily be shown false using tools like NewRelic. Of course YMMV depending on
by bascule 16y ago
That's a false dichotomy, especially for most Rails applications, and one that can easily be shown false using tools like NewRelic.
Of course YMMV depending on the nature of your Ruby application, but in general (and particularly for Rails applications) they are quite CPU hungry. Assembling HTML, XML, and JSON can be quite CPU intensive, especially for large documents. This can be mitigated to a certain extent with techniques like fragment caching (or page caching, which prevents requests from ever hitting the Rails stack)
Sure, a large part of the Rails request cycle is going to be spent in I/O wait on databases or other external services. But after that wait is over, the app gets to work synthesizing that data into a response to send back to the client, and that process is typically CPU intensive.