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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:03:40+00:00 2026-06-16T04:03:40+00:00

I have a string of about 6350268 characters and when I output them to

  • 0

I have a string of about 6350268 characters and when I output them to the browser it takes up at least 700ms, but usually 900ms to 1000ms of extra execution time to output it.

The generation only takes up about 300ms, but together it’s almost a whole second.

Is there a way to speed up echo output? or is it limited by the browser to which it is outputted?

    // What this code does is take about 20.000 urls in the database and
    // and transform it into a collapsable folder tree
    // this process generates about 6300000 characters in about 300ms.

    $this->benchmark->mark('code_start');
    $query = $this->db->query("SELECT `url` from `site_pages` WHERE `url` not like '' order by `url` ASC");
    $arr = array();
    foreach($query->result() as $result)
        {
        $arr[$result->url] = $result->url;
        }
    $tree = $this->explodeTree($arr,'/',true);
    $str = $this->plotTree($tree);
    echo $str;
    $this->benchmark->mark('code_end');
    echo $this->benchmark->elapsed_time('code_start', 'code_end');
    echo "<P>done";
  • 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-16T04:03:41+00:00Added an answer on June 16, 2026 at 4:03 am

    You’re outputting 6MB to the browser? Whichever way you look at it, everything about that process is bound to be slow. My guess would be a combination of PHP buffers and the web server buffering/sending the content is what’s taking so much time. Worrying about this particular bottleneck seems like the wrong point to focus on. You should not dump 6MB of data on the browser but use gentler AJAX loading.

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

Sidebar

Related Questions

I have a string that is about a thousand characters long composed of L's,
I have a string buffer of about 2000 characters and need to check the
My string is about 14 characters long and I have to move a character
Background: I have string of html with about 10 image tags that passes through
i have a problem. i want to get info about my string have other
I have a question about string in TCL: HANDLE_NAME /group1/team1/RON proc HANDLE_NAME {playerName} {
I have little doubt about string reading in C. string reading functions like gets,
I have a string which is of about 1mb size. The requirement is to
I have the following string repeated many times (about 10 times) <br /> <a
I'm always confusing about this stuff. I have this query : string[] names =

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.