(cp 3e5acb7) fixes #1392 improve performances to find related albums

* new conf setting related_albums_maximum_items_to_compute (1000 by default). Beyond this number of photos in current set, do not try to find related albums.

* new conf setting related_albums_display_limit : only display the heaviest (most related) albums.
This commit is contained in:
plegall
2021-05-04 17:22:20 +02:00
parent fd3d4fa7d3
commit 22f4608b2e
3 changed files with 21 additions and 3 deletions
+2 -2
View File
@@ -718,9 +718,9 @@ SELECT
function get_related_categories_menu($items, $excluded_cat_ids=array())
{
global $page;
global $page, $conf;
$common_cats = get_common_categories($items, null, $excluded_cat_ids);
$common_cats = get_common_categories($items, $conf['related_albums_display_limit'], $excluded_cat_ids);
// echo '<pre>'; print_r($common_cats); echo '</pre>';
if (count($common_cats) == 0)