Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6123129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:58:46+00:00 2026-05-23T15:58:46+00:00

My Rails app runs fine in development mode (without caching) but in production has

  • 0

My Rails app runs fine in development mode (without caching) but in production has a hard time loading the :show view for the primary model. The log only shows SQL queries which add up to about 45ms, but the actual render time is about 15 seconds. I’m using acts_as_ferret and paperclip, but paperclip is only calling the after_save loop to no action. There are only 1 or 2 users online at the time, so I’m not thinking I’ve got a backed up queue, but I really can’t narrow down what’s hogging up the site. What can I do to more precisely measure server-side functions and see what is backing up the load time?

Things called in the :show view

  • about 12 HABTM lists (types of tags, categories, etc.)
  • Related videos found with acts_as_ferret
  • HABTM comments for the videos

And that’s really pretty much it. And how should I call HABTM as a Rails best practice? Right now I”m doing something like:

<%= @video.tags.map {|t| link_to t.name, path} %>
<%= @video.categories.map {|c| link_to c.name, path} %>
#etc....

I’m pretty sure there’s a better way to do this, and I’m open to suggestion

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:58:46+00:00Added an answer on May 23, 2026 at 3:58 pm

    Here are a few tools to really pinpoint bottlenecks:

    1. http://newrelic.com/
      will analyze things like db query time and ruby execution time on the server side

    2. http://developer.yahoo.com/yslow/
      will analyze things like response time, render time, and javascript on the client side

    There’s not a lot of given code to run with, but there’s a few things that generally help in rails find or where:

    1. use :includes to reduce number of queries.
    2. use :select rather than selecting all columns

    Great links on the subject:
    http://snippets.dzone.com/posts/show/2089
    http://www.fortytwo.gr/blog/18/9-Essential-Rails-Tips
    http://www.engineyard.com/blog/2009/thats-not-a-memory-leak-its-bloat/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My rails app runs fine on my local Ubuntu machine, but when I push
I'm having some hard time running my app on Heroku - The app runs
I've recently pushed a Rails 3.1 App to heroku. Locally, everything works fine, but
My Rails-app has a sign in box with a remember me checkbox. Users who
My Rails app has some pages which are SSL-required and others which are SSL-optional.
I'm writing a Ruby on Rails app that normally runs on Heroku or a
In my Rails app, I have a Runs model, a Timesheets model, and an
I recently added devise confirmable module to my rails app. My application runs well
I have few variables which are used system-wide in my rails app. It runs
As I said in a previous post, our Rails app has to interface with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.