I noticed that my rspec tests which interacted with
Dragonfly attachments on my models
were slowing down my test suite. Without even profiling I could see in my
terminal menu bar that running these specs was resulting in system calls to
ImageMagick convert
and identify
commands.
This seemed entirely unnecessary to me in a test environment, so I came up with this small monkeypatch to bypass Dragonfly's typical calls out to ImageMagick:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
YMMV, but this resulted in a pretty significant speed increase in my image-centric application - on the order of 2x faster! Good times.