Questions tagged [output-buffering]

Use output-buffering for questions related to the use of one or more buffers in order to optimize performance by batching write operations

References

414 questions
5
votes
0 answers

Enabling unbuffered output in python 3.x (with wxPython GUI) logging

I have a Py3.x GUI app I've been building with Gooey. The app is fully functional, and the GUI works as intended, with the exception of the built-in console/terminal receiving buffered output. This isn't an issue if I run the .py file with pythonw…
Joe Healey
  • 1,232
  • 3
  • 15
  • 34
5
votes
3 answers

How to check if output buffering is enabled in Python

There are a lot of ways to set output buffering off in Python: Disable output buffering What makes me curious is how do I know that output buffering is really really already off? What is the best and simple way to check it?
Aminah Nuraini
  • 18,120
  • 8
  • 90
  • 108
5
votes
4 answers

real-time printing to console with R in jupyter

Using an R GUI or just R from a command line, this code results in integers being printed 0.2 seconds apart. In contrast when I use R in a jupyter notebook, all of the printing happens only after the loop is complete. for(x in 1:10){ print(x) …
Curt F.
  • 4,690
  • 2
  • 22
  • 39
5
votes
1 answer

phpunit with output buffering

I'm trying to integrate PHPunit into a big project, everything seems fine except it seems that all methods that rely on ob_start() will result in a risky test. Reading online, it seems risky tests are such tests which execute code not covered by the…
Patrick
  • 3,289
  • 2
  • 18
  • 31
5
votes
1 answer

Emacs/Python: running python-shell in line buffered vs. block buffered mode

In a related question and answer here, someone hypothesized that python-shell within emacs(23.2) was block-buffered instead of line-buffered. The recommended fix was to add sys.stdout.flush() to the spot in my script where I want stdio to flush its…
MikeRand
  • 4,788
  • 9
  • 41
  • 70
5
votes
1 answer

Output Buffer versus file_get_contents in PHP

What are the differences between these two ways of obtaining file contents? Which one is better and more efficient? I think they both obtain the same results but I really don't know which method is better. For example. This code uses output…
user1475493
5
votes
1 answer

What are the "serious performance implications" of implicit_flush?

My site's admin section has a bunch of very slow report-generating scripts that echo output line by line as it is generated. To have this output flushed immediately to the browser, instead of the user having to wait for minutes before they see any…
Mark Amery
  • 143,130
  • 81
  • 406
  • 459
5
votes
2 answers

How do I stop PHP output buffering from eating error messages?

Well, now that I've gotten a bit further into it, I realize that this is a stupid question, and wrong. Turns out that the author of the legacy code I maintain was hi-jacking the error log to a different file with a php_init statement. The hi-jacking…
David Eyk
  • 12,171
  • 11
  • 63
  • 103
5
votes
1 answer

Why even simple pages like phpinfo is cut off on specific server?

On one of my clients production servers (Linux, Apache, PHP5) simple page output is returned partially and only to Google Chrome. For example, I have set up simple phpinfo page, like When I call that page like…
DarkSide
  • 3,670
  • 1
  • 26
  • 34
5
votes
2 answers

How to find why phpunit testsuite is too slow with xdebug?

At phpMyAdmin we suffer strange testsuite slowdown for some time. We've been able to trace the problems down to situation when xdebug is enabled (for code coverage) and there is an error inside ob_start/ob_end_clean block. Removing either of these…
Michal Čihař
  • 9,799
  • 6
  • 49
  • 87
4
votes
1 answer

JavaScript (with Ajax) from PHP and Output Buffering

I now have a working JSON formatted file from my PHP scripts. The next step is to have a JavaScript script to retrieve this data for sorting, filtering and displaying. I have a working Ajax script that tests ok for pulling back data, but I need to…
Peter Gross
  • 213
  • 2
  • 4
  • 14
4
votes
1 answer

PHP Flush All Levels of Output Buffering

I'm trying to implement a simple Http Response class that implements Http Streaming (or Chunked-Encoding). For this to be possible, I need to set output_buffering = Off in the php.ini, and flush the output at certain intervals. PHP does a good…
efritz
  • 5,125
  • 4
  • 24
  • 33
4
votes
3 answers

CentOS Linux release 8.0.1905 not taking change of php.ini

I want to remove output_buffering and want to make change to memory_limit by editing etc/php.ini file But none of my changes are taking effect. After editing etc/php.ini file as a super user. I've restarted httpd.service using following…
Viral
  • 441
  • 9
  • 17
4
votes
1 answer

Turning on Output_Buffering creates 404 errors on random pages

I've been playing with output_buffering in php (confirmed by phpinfo()) and I just discovered that upon turning it on, I will start getting random 404 errors on my pages, but the page content loads fine and everything looks ok. This only happens on…
mcheah
  • 1,209
  • 11
  • 28
4
votes
1 answer

flush() Not displaying output in PHP?

I have this code: set_time_limit(0); header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); ob_flush(); flush(); $start = time(); $secs = time() - $start; while ($secs <= 300) …
Ali
  • 261,656
  • 265
  • 575
  • 769