3 ms·
I'm sorry, I agree it is a beautiful language. But Ruby is slow. Performance matters. In a world when everything seems to run in cloud servers, efficiency matt
by Shorel 4y ago
I'm sorry, I agree it is a beautiful language.
But Ruby is slow. Performance matters. In a world when everything seems to run in cloud servers, efficiency matters.
If you can have 20 times more simultaneous users in the same cloud server by using a different tech stack, there's no reason to keep using Ruby.
For the record, I also think Python is generally slow, but it has improved in the latest version, and the important libraries for Python are written in C++.
- chrischattin 4y agoI guarantee the language is not the limiting factor in a web scaling problem.
- berkes 4y agoNot in the vast majority of practical use-cases anyway. There'll obviously always be the exceptions like Twitter having to migrate off Ruby (Well rails) because scaling is just too hard. But those are exceptions.
- jeltz 4y agoAnd Rails back then was extremely slow. There have always been web frameworks for Ruby with way less overhead.
- scruple 4y agoMy direct experience with combating scaling issues in Rails applications always comes back to Rails itself. (ab)uses of Active record, specifically. And sometimes they're very hard to detangle. After well over a decade of doing this sort of work I'm simply not interested in seeing yet another Rails mess.
- berkes 4y agoI do agree that Rails is often a cause of bad performance. Not in the first place because of its own, or Ruby's poor performance, but because it's easy to write horrible code, and hard to write nice code in it. AR is a very leaky abstraction over a DB. A horrible query always a mere has_many, sort or default scope away. It's MVC horribly unsuited to manage and isolate business logic. The result often indeed being code that performs terrible.
- yurishimo 4y agoAnd then there is PHP... which is also insanely fast now compared to even 5 years ago, it is stateless by default, but you can also run application servers in long threads for even more performance. For 2023, the PHP community is seriously committing resources to making this long running scenario more efficient and performant. Except for the ML/AI use case, Laravel has more batteries included I would argue than Django. A ton more features when compared to Rails. All of them are first party solutions for things like Auth/Queues/Monitoring/Payments/Testing/Local Development and even some starter kits. If you're building a new web based company that isn't focused on building the next AI avatar generator, Laravel should be on your radar if you're also considering Rails or Django.
- Shorel 4y agoI learned about DB migrations with Laravel. Now I use them everywhere :)
- vidarh 4y agoIf anything, the popularity of the major cloud providers is evidence that efficiency in the sense of computing power per dollar matters very little to most, as their pricing is extortionate.
- jeltz 4y agoRuby is no slower than Python, it is actually often faster. And many of the important Ruby libraries are written in C.
- Shorel 4y agoMeanwhile, the world is moving to Rust, Go, Julia, fast compiled languages. And C++20 is actually very nice to use. In contrast, these two, Ruby and Python, are slogs.