From 86c17c394ce679f8d6544b389208459a563c5312 Mon Sep 17 00:00:00 2001 From: Chris Westra Date: Wed, 25 Jan 2017 14:19:19 -0500 Subject: [PATCH] Reduce mime-types gem memory usage This is based on https://github.com/mime-types/ruby-mime-types/pull/96, and some kind words from Alex Burkhart. By using the columnar store in the mime types gem we should be able to save 10-20MB of memory per ruby process. --- Gemfile | 1 + Gemfile.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 87827d78487..9db307268f8 100644 --- a/Gemfile +++ b/Gemfile @@ -38,6 +38,7 @@ gem 'kaminari' gem 'lograge' gem 'mail_safe', require: false gem 'migration_data' +gem 'mime-types', '~> 2.99', require: 'mime/types/columnar' # memory savings, we can also updgrade to 3.x gem 'mini_magick' gem 'newrelic_rpm' gem 'nokogiri' diff --git a/Gemfile.lock b/Gemfile.lock index fd2899f2758..b3d38549a01 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -744,6 +744,7 @@ DEPENDENCIES lograge mail_safe migration_data + mime-types (~> 2.99) mini_magick newrelic_rpm nokogiri