Depending on the setup. As Senthil writes, as long as you have a cache-proxy in front, it's fine with Dragonfly.
But if you are using the built-in rails caching, Carrierwave will perform better, as the files can be loaded without any processing. If you don't do any processing, it doesn't matter.
Here's how I summarized when considering both for Images on a project with Mongomapper:
Carrierwave:
- Pros
- Generates thumbs on upload (saves CPU time)
- Can use files directly from a static/cached document
- Doesn't need any cache-front
- Supports various storage backends (S3, Cloudfiles, GridFS, normal files) easy to extend to new storage types if needed.
- Cons
- Generates thumbs on upload (diffucult to generate new thumbsizes)
- Doesn't natively support mongomapper
- Uses storagespace for every file/thumb generated. If you use normal file storage, you might run out of inodes!
Dragonfly:
- Pros
- Should work with mongomapper, as it only extends ActiveModel
- Generates thumbs on the fly (easier to create new layouts/thumbsizes)
- Only one file stored! Saves space :)
- Cons
- Eats CPU on every request if you don't have a cache-proxy, rack::cache or similar.
- No way to access thumbs as files if needed.
I ended up using both in the end.
A future wish is for carrierwave to suppert MongoMapper again. After using both in various situations, I've found that the features in MongoMapper (rails3 branch) always works, and are easy to extend using plugins. Cannot say the same for Mongoid as of now, but that might change.