Is flickr plugin that slow in rails?

Hi there,

I’m creating a little web app that do, among other stuff, a bit of
flickr search.

The code is like this:

VIEW

<% form_remote_tag :url => {:action => ‘search’}, :update => ‘photos’,
:complete => visual_effect(:blind_down, ‘photos’),
:before => %(Element.show(‘spinner’)),
:success => %(Element.hide(‘spinner’)) do %>

<%= image_tag ‘spinner.gif’, :id => ‘spinner’, :style => ‘display: none’
%>

Tags <%= text_field_tag 'tags' %> <%= submit_tag 'Search' %>

<% end %>

CONTROLLER

flickr = Flickr.new ‘b715a2a59427bb1bbc91683af31877f5’
render :partial => “photo”, :collection => flickr.photos(:tags =>
params[:tags], :licence =>‘5’ , :per_page => ‘24’, :sort =>
“interestingness-desc”)

_PHOTO.RHTML

So, it takes about 20 seconds for just showing 24 photos, is it normal?
how could I speed this up? What it takes too much time in rendering each
picture, but I don’t know how to fix that. This is what the server
shows:

Rendered collect/_photo (872.5ms)
Rendered collect/_photo (1024.3ms)
Rendered collect/_photo (968.2ms)
Rendered collect/_photo (853.9ms)
Rendered collect/_photo (826.3ms)
Rendered collect/_photo (926.4ms)
Rendered collect/_photo (851.0ms)
Rendered collect/_photo (841.1ms)
Rendered collect/_photo (855.3ms)
Rendered collect/_photo (976.2ms)
Rendered collect/_photo (876.9ms)
Rendered collect/_photo (840.0ms)
Rendered collect/_photo (939.1ms)
Rendered collect/_photo (934.9ms)
Rendered collect/_photo (836.2ms)
Rendered collect/_photo (870.8ms)
Rendered collect/_photo (861.1ms)
Rendered collect/_photo (850.7ms)
Rendered collect/_photo (846.0ms)
Rendered collect/_photo (861.6ms)
Rendered collect/_photo (848.5ms)
Rendered collect/_photo (827.8ms)
Rendered collect/_photo (950.1ms)
Rendered collect/_photo (893.2ms)

Any idea?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs