From 7a74c3644847b9fb25b9083656c4df7e62dfcf96 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 15 Feb 2021 18:18:29 +0100 Subject: [PATCH] Setup/Profiler exclusions * set time limit to generation of profiler exclusions file * remove some unused logging --- setup/tools/filegen/profiler.func.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/setup/tools/filegen/profiler.func.php b/setup/tools/filegen/profiler.func.php index dd9b7403..9582885a 100644 --- a/setup/tools/filegen/profiler.func.php +++ b/setup/tools/filegen/profiler.func.php @@ -375,21 +375,13 @@ if (!CLI) /******************/ $scripts[] = function() use (&$exclusions) { - $s = count($exclusions); - $i = $n = 0; - CLI::write('applying '.$s.' baseline exclusions'); + set_time_limit(2); + + CLI::write('applying '.count($exclusions).' baseline exclusions'); DB::Aowow()->query('DELETE FROM ?_profiler_excludes WHERE comment = ""'); + foreach ($exclusions as $ex) - { DB::Aowow()->query('REPLACE INTO ?_profiler_excludes (?#) VALUES (?a)', array_keys($ex), array_values($ex)); - if ($i >= 500) - { - $i = 0; - CLI::write(' * '.$n.' / '.$s.' ('.Lang::nf(100 * $n / $s, 1).'%)'); - } - $i++; - $n++; - } // excludes; type => [excludeGroupBit => [typeIds]] $excludes = [];