(cp 683e113) Issue #1790 album manager performances (#1805)

* change the meaning of light_album_manager_threshold to load less user interface (instead of redirecting to the old album manager). In the light mode, do not load tiptip.

* remove dropdown menu, to reduce DOM size

For example, on a 16k albums, load time goes from 18 to 8 seconds on MatthieuLP computer.

Co-authored-by: Matthieu Leproux <matthieu.leproux@gmail.com>
This commit is contained in:
plegall
2022-11-23 10:47:34 +01:00
parent 117c7c7530
commit ed28487565
3 changed files with 135 additions and 154 deletions
+1 -12
View File
@@ -20,18 +20,6 @@ SELECT
;';
list($albums_counter) = pwg_db_fetch_row(pwg_query($query));
if ($albums_counter > $conf['light_album_manager_threshold'])
{
$url = get_root_url().'admin.php?page=cat_list';
if (isset($_GET['parent_id']))
{
$url.= '&parent_id='.$_GET['parent_id'];
}
redirect($url);
}
// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok |
// +-----------------------------------------------------------------------+
@@ -273,6 +261,7 @@ $template->assign(
'PWG_TOKEN' => get_pwg_token(),
'nb_albums' => count($allAlbum),
'ADMIN_PAGE_TITLE' => l10n('Albums'),
'light_album_manager' => ($albums_counter > $conf['light_album_manager_threshold']) ? 1 : 0,
)
);