Removing Jquery

As I mentioned in my last post, one of my older Rails apps has been out in production for two years now. When I wrote it back in 2019, I used jQuery and Bootstrap, along with a few other older technologies. Reviewing it recently, I updated to the latest version of Rails 5, removed CoffeeScript, and did some more cleaning and updates. As that work came to a close, I lamented the fact that for all the improvements, the real slow spot in this app is that it still loads the jQuery and Bootstrap assets which are relatively large given the simplicity of the front end. ...

May 2, 2021 · Thomas Ruggeri

Legacy Already

The other night I was looking over an old app of mine, the Chore Scheduler. It started as a desire to rip out references to unused Rails engines, such as ActionCable and ActionMailer. Since these are not used by the app, but were included by the basic rails new command. Off we go on another adventure. You can take a look at the repo as it’s open on Github. Runtime Dependencies I started out by ripping out the require rails/all in my application.rb. This all file requires a bunch of pieces, such as ActiveRecord, ActiveStorage, ActionCable, etc. So by removing it, and manually adding each engine that I actually want to use, I can reduce the amount of code loaded at runtime. Not a huge win, but why not? ...

April 14, 2021 · Thomas Ruggeri