public-law/asset_ram: Reduce Rails allocations by 35%+ and gain a speed boost. Memoizes asset links.
21-Jun-2025 20
Reduce Rails allocations by 35%+ and gain a speed boost. Memoizes asset links. - public-law/asset_ram
Rails 7 update: I measured a 35% reduction in allocations. I tested my app's home page in production:
Rails 7.0.6
Ruby 3.2.2
Sprockets v3 and v4
JE_MALLOC
--enable-yjit
The page is simple with only five images. If you have more, you'll get an even bigger boost:.
public-law/asset_ram: Reduce Rails allocations by 35%+ and gain a speed boost. Memoizes asset links. #ruby #rubydeveloper #rubyonrails #public-law/asset_ram: #Reduce #Rails #allocations #speed #boost. #Memoizes #asset #links. #asset https://rubyonrails.ba/link/public-law-asset_ram-reduce-rails-allocations-by-35-and-gain-a-speed-boost-memoizes-asset-links