From 2c8eff9b530098fc9690b92dcab2fd46cdd1f91c Mon Sep 17 00:00:00 2001 From: Jonathan Vollebregt Date: Tue, 31 May 2016 21:02:16 +0200 Subject: [PATCH] Update AdminerTablesFilter * Removes children request (Should work on IE6, 7, 8 now) * Uses instead of * Doesn't leave said tags behind after updating the list * Highlights multiple matches in a single table name * Works case insensitively * Improves performance with setTimeout With 400 tables, the old implementation locks up the tab (or browser if using something without multiprocess) for about half a second per keyup. Yes, this includes modifiers that don't actually change the filter. The new version handles the same event in 0.09 milliseconds. That's with all the above improvements. Tested in firefox 45.1.1 performance monitor. --- plugins/tables-filter.php | 59 ++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 17 deletions(-) diff --git a/plugins/tables-filter.php b/plugins/tables-filter.php index 809a4cbb..f625235f 100644 --- a/plugins/tables-filter.php +++ b/plugins/tables-filter.php @@ -7,28 +7,53 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerTablesFilter { - - function tablesPrint($tables) { - ?> + function tablesPrint($tables) { ?> +

+

+ $type) { + echo '".lang('select')." "; + echo '".h($table)."
\n"; +} +?> -

\n"; - foreach ($tables as $table => $type) { - echo '" . lang('select') . " "; - echo '" . h($table) . "
\n"; - } return true; } - }