FileRepo: create output buffer and set ob_implicit_flush for file streaming
authorZhuyifei1999 <zhuyifei1999@gmail.com>
Wed, 9 Aug 2017 09:51:41 +0000 (09:51 +0000)
committerZhuyifei1999 <zhuyifei1999@gmail.com>
Wed, 9 Aug 2017 09:52:10 +0000 (09:52 +0000)
commit0bce3d6b8c1dc3c2aa1e686f0b5bafc4fd9ba550
treead1a93622b50cf64b4265e7c2e3023e3432c41ac
parent590f1bd8c261c882f23c2a404fbcc40ae4e5d460
FileRepo: create output buffer and set ob_implicit_flush for file streaming

HHVM does not flush automatically until the output is done, unless
flush() is called. We create an output buffer so that PHP is aware
of the amount of data in the output buffer; we set ob_implicit_flush
so that, when output buffer is full and being flushed, it flushes
HHVM's buffer as well, emptying the OOM culprit.

Bug: T172851
Change-Id: I34dd1034590779ab51f197762177ad03291e3581
includes/filerepo/FileRepo.php