People too often cite "speed of the language" as the only reason to abandon Rails (and Ruby). But this is a bit of a stretch, because you'll hardly ever have this performance problem at all and if you do, paying a little more for hosting infra "solves it"¹. You'll hardly ever reach the scale at which this truly starts to matter.
I'm certain there are other, far more valid reasons to migrate to Java, .net, Go, Rust or whatever. Rails' opinionated setup might simply not fit your use-case. Lacking language features (Interfaces, Typing, etc). Poor libraries(in your domain). Complex deployment- and operating stack. Too few good and experienced developers who know and like Ruby around and so forth and so on.
There are numerous reasons to move away from Rails and Ruby. Speed is but one. And often the easiest to solve in other ways.
¹ Actually, in my previous role as Rails consultant I often did performance tuning for Rails. 99.99999% of the times the executing time nor the GIL, nor the GC, are the problem. But the database is. Poor DBA, in my experience is the thing that makes most Rails apps slow. For which I blame Rails, because it makes it so damn easy to forego any sane design on the DBA, and just hobgobble together some `@user.devises.active.order(:used_at).messages.new` in your views, which fires the worst ever query on your database.
> But often the only solution is having a custom view made.
Sometimes.
But I'd urge you -and every Rails dev struggling with this- to look at how and where you can decouple and separate the concerns in your (quite likely) ball-of-models.
Most often that is a far more sustainable solution. One that helps you not only with performance.
I'm certain there are other, far more valid reasons to migrate to Java, .net, Go, Rust or whatever. Rails' opinionated setup might simply not fit your use-case. Lacking language features (Interfaces, Typing, etc). Poor libraries(in your domain). Complex deployment- and operating stack. Too few good and experienced developers who know and like Ruby around and so forth and so on.
There are numerous reasons to move away from Rails and Ruby. Speed is but one. And often the easiest to solve in other ways.
¹ Actually, in my previous role as Rails consultant I often did performance tuning for Rails. 99.99999% of the times the executing time nor the GIL, nor the GC, are the problem. But the database is. Poor DBA, in my experience is the thing that makes most Rails apps slow. For which I blame Rails, because it makes it so damn easy to forego any sane design on the DBA, and just hobgobble together some `@user.devises.active.order(:used_at).messages.new` in your views, which fires the worst ever query on your database.