4 ms·
Yes, index the database. Another thing that can make Rails apps quite fast is using caching (Rails has some builtins that make that easy). In some cases you end
by dwheeler 4y ago
Yes, index the database. Another thing that can make Rails apps quite fast is using caching (Rails has some builtins that make that easy). In some cases you end up skipping a database lookup and running little Ruby code, which is a huge speedup when you can do it.
- ehnto 4y agoCaching seems to be a general purpose approach that got lost the longer my career went on. I suspect as networks and computers got faster people stopped thinking the added complexity was worth it, but it's still invaluable in bigger applications.
- thom 4y agoCaching on web apps got harder the more stuff moved to the client, I’m not sure it’s just laziness.
- berkes 4y agoLuckily there is more to Ruby than Rails. I love writing Ruby code, but dislike Rails (with a passion - as I point out in my article in both footnotes and between the lines ;) (bad) performance of your Rails code is very much about Rails. And very much about how easy Rails makes it to abuse your database. But much less about the performance of the language Ruby.