Hi Ben,
Try to use batches and paging while each click on the next page button increases the offset 1 segment.
for exporting if you want to export all records that meet the search criteria you can retrieve all records without batches when you click the export button.
Thanks
Hi Ben,
You're probably waiting for the retrieved data to load in your browser state. The solution for this is to load less records on your page and use paging. But like you already mentioned, you are doing this because of an excel export that needs all records in state.
So you might want to look at different options for exporting, like creating a custom csv based on the same datasource in a microflow or using the excel exporter module.
Wondering what kind of function you are using now for exporting since it needs all objects on the page?
Personally I like the String Stream module for exporting data, it's really fast but you will always export text based files like csv.