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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:25:53+00:00 2026-06-17T14:25:53+00:00

On my site, I have an average latency (when not backing up, etc) of

  • 0

On my site, I have an average latency (when not backing up, etc) of ~150ms for a particular AJAX file (the crux of the UI). I’ve reduced that down from ~250ms by doing a few server-side/databases tricks, and I think there’s one last trick that might drop it another 10ms or so from the current ~30ms total for the actual PHP/MySQL portion of the page.

I’m using keep-alive, so I think the ssl handshake is more or less totally out (but I hope to move to SPDY soon, so I don’t really know how that helps after the initial handshake).

When I ping, it averages ~55ms.

I make a connection to MySQL at the beginning of the file and close it at the end. I’m pretty sure that costs around ~10ms.

So where does the remaining ~55ms come from?

This may seem totally obsessive, but this is for rapid dynamic pagination, and the effect is seriously degraded by each ms of latency.

Many thanks in advance!

  • 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-06-17T14:25:54+00:00Added an answer on June 17, 2026 at 2:25 pm

    If you have an HTTP connection established, you should be able to run single simple, short HTTP request in about same time as ping.

    To test this, time how long it takes to GET a static file.

    Next, try to GET a small chunk of data from a PHP page that doesn’t use any libraries.

    Next, try add your require’s and libraries without changing the output. This can be significant, e.g. using Zend and a few of its packages easily takes 40ms with xcache and generally fast system. You may want to change the way PHP is ran, e.g. apache prefork mod_php has to start a new process and php has to load libraries for every request. If you switch to fastcgi, you can preload required libraries, open database connections in advance and remove corresponding time cost from perceived latency.

    Next, add some database queries.

    Next upgrade to AJAX.

    Now AJAX usually makes a POST request, which in HTTP 1.1 means Expect: 100-continue header and add one more round trip. Try to disable that header.

    Finally, record your query and response and try to strip out everything you don’t need. Ideally you want request and response each to be under 1K, though if your connection is kept alive, tcp window grows and it may be ok to push, say, 16K messages after a while. Request is relatively easy — it’s usually smallish, remove unneeded cookies, etc; response is harder as it’s your data, try compression or sending only the data that is actually used, without formatting, styles, or anything else that could be done on the client side.

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

Sidebar

Related Questions

I have a wordpress site with 5k post and each post has average 25
So I have site list on certain pages that basically just have links to
In my live site I have php include() and require() that have full path
For example I have site http://localhost/site In IIS I set that 404 error causes
I have a Drupal site built on a shared host and I'm finding that
I noticed that i have not being getting traffic via google organic searches. I
I have a web-site that has a hosting at some popular hosting company. The
Site that have nice but raising number of visits / hits, heavily operates on
I have created a simple test (just to download a file from famous site
I have a custom RatingBar in my app that should display either the site

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.