Quantcast
Channel: Recent discussions in FreshRSS/FreshRSS, category: general
Viewing all articles
Browse latest Browse all 37

Slow loading of pages with a lot of Youtube entries

$
0
0

Not sure if this is a bug so I'm starting a discussion instead. When displaying a Youtube feed, the page takes way more time to finish rendering completly than it takes when there are no Youtube feed entries. I've noticed a lot of "grey.gif" images are loaded when it does so (as seen by the "Network" tab on the browser's developer tools), maybe a fallback mechanism of some sort?

This seems to be the relevant part of the code loading the gif:

FreshRSS/lib/lib_rss.php

Lines 609 to 619 in fd7157e

functionlazyimg(string$content): string {
return preg_replace([
'/<((?:img|iframe)[^>]+?)src="([^"]+)"([^>]*)>/i',
"/<((?:img|iframe)[^>]+?)src='([^']+)'([^>]*)>/i",
], [
'<$1src="' . Minz_Url::display('/themes/icons/grey.gif') . '" data-original="$2"$3>',
"<$1src='" . Minz_Url::display('/themes/icons/grey.gif') . "' data-original='$2'$3>",
],
$content
) ?? '';
}

There really seems to be a strange behaviour somewhere, because when I uncheck "Use lazy load mode to load pictures" in reading configuration and I go back on a Youtube feed, it loads quickly BUT there are so many requests going on after a little while initiated by youtube.com domain and others (doubleclick trying to load ads, etc) that it looks like every feed entry is entirely loaded as if I was clicking and opening every link at the same time.

I'm maybe not very clear in my explanation, please try by yourself with a Youtube RSS link and the developer tools


Viewing all articles
Browse latest Browse all 37

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>