I would like from my business layer of my application to take a node, and retrieve all decendents which are of a certain document type, sort it by e.g. created data and then do paging over the results.
Is there a way to query Umbraco nodes and do paging and sorting, without having to keep all the nodes in memory? I am worried that if I were to do this on my main node, and the site would grow, that it would be a potential performance bottleneck.
Try to start with the built-in template for paging. It does the paging efficiently, not by actually grabbing everything every time, just the page you need.
In the backoffice developers section, create a new scripting file, select the Paging template and start tweaking.
Paging on nodes and memory management
Hi,
I would like from my business layer of my application to take a node, and retrieve all decendents which are of a certain document type, sort it by e.g. created data and then do paging over the results.
Is there a way to query Umbraco nodes and do paging and sorting, without having to keep all the nodes in memory? I am worried that if I were to do this on my main node, and the site would grow, that it would be a potential performance bottleneck.
Try to start with the built-in template for paging. It does the paging efficiently, not by actually grabbing everything every time, just the page you need.
In the backoffice developers section, create a new scripting file, select the Paging template and start tweaking.
Thanks Sebastiaan,
I will have a look at it.
is working on a reply...