Making Rails BLAAAAAZINGLY FAST using Turbo Frames
It is no secret, Rails isn't the fastest kid on the block. With Ruby being OOP-only & interpreted, It is at a natural disadvantage as opposed to compiled languages, in terms of back-end performance. HOWEVER, we all know Rails was popular for it's mind-boggling speed of development & ease of use which is why SOOOOO many start-ups ended up using during it's boom (pre-React 🥶). The MVC structure, partials & massive gem library make it ideal for speedy developments. - This had me curious however, how slow is Rails? I compared it to Go + Fiber + FastHTTP + GORM as was blown away. That was until I integrated Hotwire. The implementation of Hotwire proved to lower initial load times but make page-redirection near instant. The load-time speed up was welcome (over 200ms saved) but the instant refresh was incredible. For once, Rails had it's leg up on GO. Let it be known however this is Rails SPA vs GO MPA (cheaty I know!). Regardless, I am building a different fork of my Portfolio in GO whilst also converting the current Portfolio Rails fork to be Hotwire'd. The results shall show themselves soon enough! - Here are some pictures to show my findings & code I am somewhat proud of!