views:

29

answers:

0

I'm using paperclip in my rails 3 app to upload photos, resize with ImageMagick and then post to S3.

For the life of me, I can't figure out why this process is soooo slow on my localhost? Even without any resizing it's crazy slow... 30+ seconds for one photo?

And my network & cpu aren't even working hard?

Why?

Updating with Model:

class Photo < ActiveRecord::Base

    belongs_to :photo_album

  has_many :comments, :as => :commentable

  #Paperclip for photo
  has_attached_file :photo,
                    :styles => {:large => "600x600>"},
                    :default_style => :original,
                    :default_url => '/images/:attachment/default_:style.png',
                    :path => "/photos/:user_id/:attachment/:id/:style/:basename.:extension",
                    :storage => :s3,
                    :s3_credentials => File.join(Rails.root, 'config', 's3.yml'),
                    :s3_protocol => 'http'
end