Yes, this make sense, but this is only one case from a lots of other 
possibilities. For example, we can reduce the request time by fetching 
user and post in parallel, like this:

  user, post = [
    Thread.new{User.by_id request.cookies[:user_id]},
    Thread.new{Post.by_id params[:id]}
  ].collect(&:value)

Although in this case, there's probably maybe some issues with MySQL 
driver (more exactly with its C extension).
But in the case of HTTP requests (for CouchDB for example) this should 
work.
But for some reasons nobody uses such technics.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to