3 ms·
I’m with you. Writing and testing Ruby is a blast, and it’s so easy to write clean, readable code with it. Performance isn’t great, but it’s just so nice. Rails
by nunez 5y ago
I’m with you. Writing and testing Ruby is a blast, and it’s so easy to write clean, readable code with it. Performance isn’t great, but it’s just so nice. Rails adds a lot of nice magic on top that makes it even better.
JavaScript (even with TypeScript) and frontend frameworks are…quite a journey by comparison.
- baash05 5y agoI love the lang.. TBH though performance has never been something I see as a fault in the language. I've almost always found (for my apps) that it's data access that's the hold up. Like if I map the issues, n+1 or bad indexing have almost always taken the lions share of slower code bits. It irks me when people sight the lang or ruby as having bad memory or being slow. I've seen a tweak of the indexing cut response time to 25%. I even managed a 10x gain off of one index adjustment.
- CraigJPerry 5y ago>> Performance isn’t great I see so much focus on this on web frameworks generally and it strikes me as almost always the wrong thing to optimise for. I don’t know rails, the last time i tried it was circa 2007 and yet I’d confidently adopt it given the right situation. If i had a choice between shipping features 2% sooner or saving $10k / year on server costs, I’d almost always choose sooner. Let’s be honest, a rails dev team is moving more than 2% faster than a java/c# web dev team. If i have 5 devs and they’re all 2% more productive, that could be around $10k of free developer output but it’s more than that, developer productivity compounds. 75% off my server costs doesn’t.
- brigandish 5y agoThe problem with this comparison is that a language like Crystal shows that you don't have to give up the expressiveness for performance.
- montblanc 5y agoStay tuned about performance, the Ruby JIT being built by Shopify is gonna narrow the gap. It's now 25-30% faster than CRuby , we'll see in a year how faster it gets. Source: https://speed.yjit.org/ https://speed.yjit.org/
- ydnaclementine 5y ago> Perfomance isn't great I would argue that the performance hit isn't from ruby or the framework, but from people abusing the database with lazy loading in active record. Force people to fetch all the data they need in one query (similar to Ecto), and your performance will improve. There's some config value that disables lazy loading too
- projct 5y agoThis is the most common slowdown I've seen in rails before. strict_loading mode can help, as can the bullet gem. That said, it is also quite slow when you actually do need requests per second or rows per second, but the usual thing is to throw more machines at it,reduce the amount of magic in the hot path (like activerecord-import for bulk data if that's still maintained,) or use something else for the hot path.
- nunez 5y agoTo clarify, performance isn't "great" (i.e. Ruby tends to be slower than writing the same code in, say, Go), but it's good enough for most things.