sending the "fake" header at each it�ration is about ten times faster than checking elapsed time and send the header each 20 seconds
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2001-12-09 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||
* read_dump.php3; libraries/build_dump.lib.php3: sending the "fake" header
|
||||
at each it<69>ration is about ten times faster than checking elapsed time
|
||||
and send the header each 20 seconds.
|
||||
|
||||
2001-12-08 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||
* libraries/left.js, lines 234-240: fixed a js bug with empty databases.
|
||||
* libraries/functions.js: improved pointer code (for Opera 6.0).
|
||||
|
@@ -202,7 +202,6 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
||||
$search = array("\x00", "\x0a", "\x0d", "\x1a"); //\x08\\x09, not required
|
||||
$replace = array('\0', '\n', '\r', '\Z');
|
||||
$is_first_row = TRUE;
|
||||
$prev_time = time();
|
||||
|
||||
@set_time_limit($GLOBALS['cfgExecTimeLimit']);
|
||||
|
||||
@@ -242,13 +241,8 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
||||
// Call the handler
|
||||
$handler($insert_line);
|
||||
|
||||
// loic1: each 20 seconds, send a fake header to bypass browser
|
||||
// timeout
|
||||
$new_time = time();
|
||||
if ($new_time - $prev_time >= 20) {
|
||||
$prev_time = $new_time;
|
||||
header('Expires: 0');
|
||||
}
|
||||
// loic1: send a fake header to bypass browser timeout
|
||||
header('Expires: 0');
|
||||
} // end while
|
||||
|
||||
// Replace last comma by a semi-column in extended inserts case
|
||||
@@ -296,7 +290,6 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
||||
$i = 0;
|
||||
$is_first_row = TRUE;
|
||||
$fields_cnt = mysql_num_fields($result);
|
||||
$prev_time = time();
|
||||
|
||||
@set_time_limit($GLOBALS['cfgExecTimeLimit']); // HaRa
|
||||
|
||||
@@ -359,13 +352,8 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
||||
$handler(trim($schema_insert));
|
||||
++$i;
|
||||
|
||||
// loic1: each 20 seconds, send a fake header to bypass browser
|
||||
// timeout
|
||||
$new_time = time();
|
||||
if ($new_time - $prev_time >= 20) {
|
||||
$prev_time = $new_time;
|
||||
header('Expires: 0');
|
||||
}
|
||||
// loic1: send a fake header to bypass browser timeout
|
||||
header('Expires: 0');
|
||||
} // end while
|
||||
mysql_free_result($result);
|
||||
|
||||
|
@@ -18,12 +18,11 @@
|
||||
*/
|
||||
function PMA_splitSqlFile(&$ret, $sql, $release)
|
||||
{
|
||||
$sql = trim($sql);
|
||||
$sql_len = strlen($sql);
|
||||
$char = '';
|
||||
$string_start = '';
|
||||
$in_string = FALSE;
|
||||
$prev_time = time();
|
||||
$sql = trim($sql);
|
||||
$sql_len = strlen($sql);
|
||||
$char = '';
|
||||
$string_start = '';
|
||||
$in_string = FALSE;
|
||||
|
||||
for ($i = 0; $i < $sql_len; ++$i) {
|
||||
$char = $sql[$i];
|
||||
@@ -119,12 +118,8 @@ function PMA_splitSqlFile(&$ret, $sql, $release)
|
||||
$sql[$i] = ' ';
|
||||
} // end else if
|
||||
|
||||
// loic1: each 20 seconds, send a fake header to bypass browser timeout
|
||||
$new_time = time();
|
||||
if ($new_time - $prev_time >= 20) {
|
||||
$prev_time = $new_time;
|
||||
header('Expires: 0');
|
||||
}
|
||||
// loic1: send a fake header to bypass browser timeout
|
||||
header('Expires: 0');
|
||||
} // end for
|
||||
|
||||
// add any rest to the returned array
|
||||
|
Reference in New Issue
Block a user