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 4343108
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:42:20+00:00 2026-05-21T11:42:20+00:00

A specific page for my ruby on rails website is slow. To figure out

  • 0

A specific page for my ruby on rails website is slow.

To figure out what’s going on, I tried followed this guide in setting up this simple test on localhost:

class BrowsingTest < ActionDispatch::PerformanceTest
  def test_homepage    
    get '/slow_page'
  end
end

At this point my test database is empty, so I’d need to seed it with some data. After digging around with various things for a few hours I’m left a bit confused, and I’m not sure if I should:

1) Somehow copy the data from the production server and stick it into the test database(is there is an easy way to do this?)

OR

2) Generate many users and posts using test fixture .yml files

OR

3) Put code in seed.rb to generate users and posts. (I tried doing this, but for some reason the stuff I generate in this file disappears by the time my PerformanceTest gets run

4) I came across some gems like Factory Girl and Faker. I haven’t tried these yet, but from what I read it seems more for creating specific situations and states rather than generating thousands of users for performance testing.

I thought this would be a common scenario, and would love to get some advice from those who’ve done this. Thank you.

  • 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-21T11:42:21+00:00Added an answer on May 21, 2026 at 11:42 am

    The best way to generate performance tests is to use real user data from your production server. If those are available to you, then definitely use them. The reason is that you want to optimize the performance of your webapp for the most common real user scenarios. Whatever scenarios you concoct that aren’t based on real user behavior are going to be less representative at best, or utterly useless at worst.

    In practice, what you want to do is:

    • Copy your production database and use that for your performance tests – this will ensure that whatever queries are running slow in production, due for example to big tables, missing indices, too many indices affecting update speed etc., do the same in your tests.
    • Parse your webserver logs to figure out the number of concurrent requests on your slow pages at peak times, and generate the same kind of load (or higher – depends on your growth expectations) in your tests.
    • You may want to look at services that offer real-life load approximations from a distributed network of servers. For example, take a look at Browser Mob
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Ruby on Rails and I'm sure this question is pretty stupid,
How to redirect to a specific page on successful sign up using rails devise
I want to keep viewstate of a specific page in session but following code
This is a very specific question regarding MySQL as implemented in WordPress . I'm
I think this is specific to IE 6.0 but... In JavaScript I add a
I'm creating a personal site with Ruby on Rails. For the most part, RoR
I'm trying to write XSLT to transform a specific web page to JSON. The
What is the easiest and most efficient way to delete a specific page from
I know that the view state approach is limited to only a specific page.
I use the following PHP script as index for my website. This script should

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.