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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:18:29+00:00 2026-06-01T05:18:29+00:00

This a question that is more on the lines of server efficiency and availability.

  • 0

This a question that is more on the lines of server efficiency and availability.

Say I have a php page that calls a AJAX script and 1 million users are connecting within the same second.

Would there be a performance boost if I limit the AJAX script so that it only echos once instead of every time it receives data?

I planned on printing all the data to a variable and then echoing that variable once the script is finished.

I’m not sure if echoing is simply storing the data in the server until the script finishes, similar to what I want to do above or if it is actually connecting with the client each time?

If a connection is made for each echo then that would be better than filling a variable with data, possibly causing the RAM to fill up fast?

This AJAX script is pulling data from a database (calls PHP page). I have a lot of “echo” statements that are simply printing table, div, tr, etc tags and then finally the data from the database. Then, once again printing table, div, tr, etc tags. Your saying that it’s better to simply fill a variable with this data and print/echo ONCE?

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-06-01T05:18:30+00:00Added an answer on June 1, 2026 at 5:18 am

    Generally, servers processes scripts and sends the output in the form of HTML, so there is no longer link between a page and server. When you are making a AJAX request, you will open the connection again and send the request.

    The main bottleneck in the performance occurs from the amount of request you send to the server. You should limit the request as much as possible.

    If a connection is made for each echo then that would be better than filling a variable with data, possibly causing the RAM to fill up fast.

    You are wrong about this, You should minimize the request as much as possible, especially, when you are processing a large number of people.


    Next, Its nearly pointless to update the content onevery pass. Look how facebook updates its content. The timers and contents are updated every minute. Except the notification part.

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

Sidebar

Related Questions

In this question , I mentioned my assumption that rubyforge gems are more official,
This is more of a cryptography theory question, but is it possible that the
I have a UIView subclass ( CustomView for purposes of this question) that has
I have this little question that's been on my mind for a while now.
This is more of a conceptual problem. I have a server, and I have
Found this question that explained a way to communicate between layers. However there is
I found this question that is discussing what I would like to do, but
I found this question that was very useful in learning the basics of the
This question is sort of a sequel to that question. When we want to
The very act of asking this question suggests that my approach to this problem

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.