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

  • Home
  • SEARCH
  • 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 884509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:45:43+00:00 2026-05-15T12:45:43+00:00

I am getting bad performance after upgrading an application to Rails 3. Before upgrading,

  • 0

I am getting bad performance after upgrading an application to Rails 3.

Before upgrading, I got 60ms – 100ms response times.

After upgrading, I get 300ms – 1500ms response times.

The log shows a sample response time from each time:

Rails 3.0.0: Completed 200 OK in 1454ms (Views:
1314.6ms | ActiveRecord: 25.1ms)
Rails 2.3.8: Completed in 31ms (View: 27, DB: 1) |
200 OK [FILTERED]

I’ve tried running using passenger and ‘rails server’ (both results are close). I’ve created two identical applications (running in 2.3.8 and 3.0.0) to demonstrate the performance differences. The code that appears to be causing the performance issues is:

<%- @posts.each do |post| -%>
  <h1><%= post.title %></h1>
  <p><%=truncate post.body %></p>
  <%- post.comments.each do |comment| -%>
    <h2><%= comment.title%></h2>
    <p><%=truncate comment.body %></p>
    <ul>
    <%- comment.ratings.each do |rating| -%>
      <li><%=truncate rating.notes %></li>
    <%- end -%>
    </ul>
  <%- end -%>
<%- end -%>

For full source, the projects are available here: http://github.com/ksylvest/performance

Thanks!

  • 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-15T12:45:43+00:00Added an answer on May 15, 2026 at 12:45 pm

    Please include the version of Ruby you are using for your tests.

    Try running Rails 3 on Ruby 1.9.2-head and see if you notice a difference. You can use something like RVM to try multiple versions of Ruby very easily.

    As noted in this SO question, 1.9.1 seems to have some performance issues. If you are using Ruby Enterprise Edition with Rails 3, that may be causing some performance issues as well. If you use plugins that are not Ruby 1.9 compatible, make sure you are using REE >= 1.8.7-2010.02 as noted on the Edge Rails Guides.

    I believe Rails 3 development is being targeted at 1.9.2 and backported to run on earlier versions.

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

Sidebar

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.