mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-10 11:25:05 -05:00
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.
This commit is contained in:
parent
2d18f5b8ab
commit
397cc09610
@ -23,14 +23,15 @@
|
||||
|
||||
<table id="trakt" width="100%" cellspacing="1" border="0" cellpadding="0">
|
||||
#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
|
||||
<tr>
|
||||
#end if
|
||||
|
||||
<td class="trakt_show">
|
||||
<div class="traktContainer">
|
||||
<div class="trakt-image">
|
||||
<a href="${cur_show["url"]}" target="_blank"><img alt="" class="trakt-image" src="${cur_show["images"]["poster"]}" /></a>
|
||||
<a href="${cur_show["url"]}" target="_blank"><img alt="" class="trakt-image" src="${image}" /></a>
|
||||
<div class="trakt-image-slide">
|
||||
<p>$cur_show["title"]</p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user