How can I speed up the load time of carrierwave / fog gems

487 views Asked by At

I can see that carrierwave is one of the slowest loading* gems (c.2.5 seconds) which is annoying when running tests in particular. Fog is also slow loading and seems to be included in the carrierwave gem anyway. Is there a way to optimize either the fog or carrierwave installations to speed up loading?

*when I say 'loading' I mean when running rails/rake/rspec

fog 1.31.0 carrierwave 0.10.0 ruby 1.9.3 rails 3.2

2

There are 2 answers

0
Matt Darby On

There is currently an effort to split fog into separate provider gems but unfortunately it will take some time.

0
Elvn On

I might suggest giving carrierwave-aws a try. They claim significant load time improvements over Carrierwave, along with "Significantly smaller footprint"

Library Disk Space  Lines of Code   Boot Time   Runtime Deps    Develop Deps
fog       28.0M        33469        0.693       9               11
aws-sdk   4.4M         80017        0.098       3               8