From 397cc09610df7809606e1a9314e2cf0697640116 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Tue, 14 Oct 2014 17:17:33 +0100 Subject: [PATCH] Improve addShows trending page by using less memory and loading quicker. The trending page shows approx. 500 images and typically, the size of fetched images were 1000 x 1500 pixels. The browser was relied on to reduce the images while rendering to 186 x 273 pixels. The result used a *lot* of memory, bandwidth, time, render processing, and server resources to populate the page so those issues have been eased by fetching smaller 300 x 450 pixel images instead. --- gui/slick/interfaces/default/home_trendingShows.tmpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/slick/interfaces/default/home_trendingShows.tmpl b/gui/slick/interfaces/default/home_trendingShows.tmpl index 41f8f35c..03af1101 100644 --- a/gui/slick/interfaces/default/home_trendingShows.tmpl +++ b/gui/slick/interfaces/default/home_trendingShows.tmpl @@ -23,14 +23,15 @@ #for $i, $cur_show in $enumerate($trending_shows): -#if not $i%6 +#set $image = re.sub(r"(.*)(\..*?)$", r"\1-300\2", $cur_show["images"]["poster"], 0, re.IGNORECASE | re.MULTILINE) +#if not $i%5 #end if
- +

$cur_show["title"]