How to Reduce Memory Usage by Tuning Gemfile

Rails is known for many things but memory effectiveness is not one of them. By default, it loads all gems, used and unused, which contributes to the overall memory footprint. Fortunately, we can easily eliminate this waste without touching the app.image_magick is a perfect example of this problem. If we manipulate images only in workers then there’s no reason to require it on web servers. Conversely, there’s no need to require web-related stuff on workers.Let’s start by understanding how Rails apps manage their dependencies.
How to Reduce Memory Usage by Tuning Gemfile #ruby #rubydeveloper #rubyonrails #gemfile https://rubyonrails.ba/single/how-to-reduce-memory-usage-by-tuning-gemfile

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles