aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-04-18 15:11:34 -0400
committerjim-p <jimp@pfsense.org>2013-04-18 15:31:19 -0400
commita171a1ebbb0cedc872bc1ad952dbc320ea8f1e82 (patch)
treeb4be4fd0137cdd07705d6d7725b820ff190f26e9
parentf5328a07d88af83763d46ffd1fc8c937aab1ce6a (diff)
downloadpfsense-packages-a171a1ebbb0cedc872bc1ad952dbc320ea8f1e82.tar.gz
pfsense-packages-a171a1ebbb0cedc872bc1ad952dbc320ea8f1e82.tar.bz2
pfsense-packages-a171a1ebbb0cedc872bc1ad952dbc320ea8f1e82.zip
Only flush the output every thousand lines. Every single line was a little too often.
-rw-r--r--config/openbgpd/openbgpd_status.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php
index e6f69d07..6b27b4de 100644
--- a/config/openbgpd/openbgpd_status.php
+++ b/config/openbgpd/openbgpd_status.php
@@ -60,9 +60,13 @@ function doCmdT($title, $command) {
fclose($fd);
} else {
$fd = popen("{$command} 2>&1", "r");
+ $ct = 0;
while (($line = fgets($fd)) !== FALSE) {
echo htmlspecialchars($line, ENT_NOQUOTES);
- ob_flush();
+ if ($ct++ > 1000) {
+ ob_flush();
+ $ct = 0;
+ }
}
pclose($fd);
}