By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,717 Members | 1,320 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,717 IT Pros & Developers. It's quick & easy.

does ob_end_flush() end all ob?

P: n/a
I didn't want blank space getting sent out before session headers or
cookies to the web, so I started using ob_start(). When it comes to
rendering the page, I wanted to turn it off, so I started to do what
you see below. Despite this, pages are taking forever to show up, and
then they are showing up suddenly, which is quite different than they
way they used to show up. It used to be you could see them render, and
you could see them pause at places on the page that needed database
calls. Now the page seems much, much slower, because it is white for
much longer. I don't think the final, overall time has changed, but it
seems much slower because you don't get to see anything at all till
everything is there. Here is the function:

function renderPage() {
ob_end_flush();
flush();

$controllerForAll = & getController();
$templateObject = & $controllerForAll->getObject("McTemplates", " in
renderPage().");
$templateObject->getTemplate();
$templateObject->renderTemplate();

flush();
}

an example of slowness is www.krubner.com
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
lk******@geocities.com (lawrence) wrote in message news:<da**************************@posting.google. com>...

I guess I can start calling flush() after every echo statement, but
that would be ugly. I'd rather figure out what the problem is. The
pages, as I say, now appear suddenly, after a long pause, so it
certainly seems as if output buffering is still on even after I call
ob_end_flush(). Nothing seems to appear till the final flush() is
called.
I didn't want blank space getting sent out before session headers or
cookies to the web, so I started using ob_start(). When it comes to
rendering the page, I wanted to turn it off, so I started to do what
you see below. Despite this, pages are taking forever to show up, and
then they are showing up suddenly, which is quite different than they
way they used to show up. It used to be you could see them render, and
you could see them pause at places on the page that needed database
calls. Now the page seems much, much slower, because it is white for
much longer. I don't think the final, overall time has changed, but it
seems much slower because you don't get to see anything at all till
everything is there. Here is the function:

function renderPage() {
ob_end_flush();
flush();

$controllerForAll = & getController();
$templateObject = & $controllerForAll->getObject("McTemplates", " in
renderPage().");
$templateObject->getTemplate();
$templateObject->renderTemplate();

flush();
}

an example of slowness is www.krubner.com

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.