From a171a1ebbb0cedc872bc1ad952dbc320ea8f1e82 Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 18 Apr 2013 15:11:34 -0400 Subject: Only flush the output every thousand lines. Every single line was a little too often. --- config/openbgpd/openbgpd_status.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config/openbgpd') 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); } -- cgit v1.2.3