|
|
|
|
|
by lloeki
999 days ago
|
|
The two major areas where caching is used in Rails are: - database queries - template rendering First one because round trip to db + running the query + allocating ORM result objects that otherwise get thrown away. Second one because allocating a ton of strings that get join'd and thrown away. > No one disputes that Ruby is slow. I am, because the blanket statement doesn't make sense without context. Also that view is largely biased by the typical assumption that Ruby == Rails. |
|
In practice though the database is doing most of the work, most of the time so is typically slower than both.
[0] https://en.wikipedia.org/wiki/The_Computer_Language_Benchmar...
[1] https://www.techempower.com/benchmarks