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 --- cli/check.translation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/check.translation.php b/cli/check.translation.php index 01e90a631..b4c7e6850 100755 --- a/cli/check.translation.php +++ b/cli/check.translation.php @@ -199,7 +199,7 @@ function findUsedTranslations(): array { $iterator = new RecursiveIteratorIterator($directory); $regex = new RegexIterator($iterator, '/^.+\.(php|phtml)$/i', RecursiveRegexIterator::GET_MATCH); $usedI18n = []; - foreach (array_keys(iterator_to_array($regex)) as $file) { + foreach ($regex as $file => $value) { if (!is_string($file) || $file === '') { continue; } -- cgit v1.2.3