What is the default order the below collection fetch would use, or would it be just random each time?
$articles = page('articles');
$articlesPageChildren = $moviePage->children();
and then i the loop:
$pages = $articlesPageChildren->slice($ndx * $limit, $limit);
If I have 1 milion articles pages that i want to process and that process fail at 200k, if i execute the above again would they be fetched in the same order?
When i try to use $moviePage->children()->sortBy(‘sort’, ‘asc’) i think it tries to fetch all at once and it takes forever somehow.
Is it really about 1,000,000 articles? Basically, I would use a strategy for a high number of pages and group the content into folders. For example, for a movie collection according to this structure:
Alternatively, you can also work with a database: https://getkirby.com/docs/guide/virtual-content/content-from-database https://getkirby.com/docs/guide/database
How efficient is sortBy(‘sort’, ‘asc’), is it loading all pages into memory? I am guessing if i do sortBy with limit and offset it will load everything into memory as well, the whole collection of pages?