Performance Impact of Using Ruby on Rails View Partials

Ruby on Rails view partials can help keep your codebase DRY, but misusing them can have a significant performance impact.Ruby on Rails view partials can help keep your codebase DRY (Don’t Repeat Yourself) but misusing them can have a significant performance impact. In this blog post, I’ll describe when you should avoid using view partials and the alternatives. Measuring The Performance Impact Let’s start by checking how much slower your app could be when running on partials. I’ve tested the Ruby 2.7, Rails 6 app using Siege. The app was configured in the production environment with Puma server, running locally to eliminate the networking overhead. The hardware was a 15 inch MacBook Pro with 2.2 GHz and 16GB RAM.Simplified code for the tested endpoint looks like this:.
Performance Impact of Using Ruby on Rails View Partials #ruby #rubydeveloper #rubyonrails #performance https://rubyonrails.ba/single/performance-impact-of-using-ruby-on-rails-view-partials

Nezir Zahirovic

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

related articles