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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:00:59+00:00 2026-05-25T21:00:59+00:00

I got a page which is generated in a few milliseconds. Completed 200 OK

  • 0

I got a page which is generated in a few milliseconds.

Completed 200 OK in 83ms (Views: 75.9ms)

When I try to load this page with “time wget http://localhost:3000/search“, I fould that it takes 1.5 seconds.

real    0m1.562s
user    0m0.001s
sys     0m0.003s

There’s no js execution time in it as it’s not loaded in browser. So what’s the extra time for? Is there any tools that can figure out time cost details in rails?
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-25T21:01:00+00:00Added an answer on May 25, 2026 at 9:01 pm

    If Rails is loaded up in development, the controllers are not cached (by default) which can add to latency and might not be captured by Rails’ measurement (can’t say I’ve looked).

    Another thing to look at is the Rack server in use. WEBrick works like a champ but is painfully slow; Thin and Unicorn are significantly faster at servicing requests. I would consider looking into using Rack middleware or Rails Metal if you need an action to be optimized for speed.

    At the TCP level, the localhost->127.0.0.1 DNS lookup will take some small amount of time. Also, wget has to establish a new socket to the app. Neither of these will be measurable by the app itself.

    For what it’s worth, that same experiment against a Rails 2.3.12 app running on Unicorn 4.0.1 hitting the login page:

    Completed in 16ms (DB: 4) | 302 Found [http://localhost/]

    real        0m0.407s
    user        0m0.000s
    sys         0m0.010s
    

    Update 9/28/2011:

    Digging in at the HTTP layer, curl supports tracing a URL request with timestamp outputs:

    curl –trace-ascii trace.log –trace-time http://localhost:3000

    To dig a bit further and see the actual calls, try using strace with timing mode on:

    strace -T curl http://localhost:3000

    Example output from both of these is available as a gist.

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

Sidebar

Related Questions

I've got a php page which handles requets for file downloads. I need to
(Scroll down to bottom of post to find solution.) Got a asp.net page which
I've got a page with a variable number of <select> elements (which explains why
I've got a JSP page with a piece of Javascript validation code which limits
I got an image with which links to another page using <a href=...> <img
I've got a WF State Machine which I use to handle page navigation on
I got two gridviews in the same page, which basically displays the same type
I got an app which has a few slow pages, so I am trying
I've got a page which will have about ten drop down lists which are
If I've got a setup where my master page has a member which is

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.