From 2601897c55e2040c21591f7b4f6041f71393346b Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 1 Oct 2025 20:21:24 +0200 Subject: API optimisation: more streaming of outputs (#8041) * API optimisation: more streaming of outputs I spotted a memory issue when testing https://github.com/FreshRSS/FreshRSS/pull/7714 Attempt to stream results more, instead of keeping too much in memory. Could be further improved. * Apply suggestions from code review Co-authored-by: Alexis Degrugillier * Minor whitespace JSON formatting --------- Co-authored-by: Alexis Degrugillier --- app/views/index/rss.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/index') diff --git a/app/views/index/rss.phtml b/app/views/index/rss.phtml index 7caf4cb9d..3d531c554 100644 --- a/app/views/index/rss.phtml +++ b/app/views/index/rss.phtml @@ -46,7 +46,7 @@ foreach ($this->entries as $item) { } } - $enclosures = iterator_to_array($item->enclosures(false)); + $enclosures = iterator_to_array($item->enclosures(false)); // TODO: Optimise: avoid iterator_to_array if possible $thumbnail = $item->thumbnail(false); if (!empty($thumbnail['url'])) { // https://www.rssboard.org/media-rss#media-thumbnails -- cgit v1.2.3