Sprout reports timing out on thousands of records I have sprout reports (twig template) exporting tens of thousands of records. Problem is that its timing out. I appreciate that this is expected and my only likely option is to up the server spec.
Is there anything i can do to optimise the report itself? e.g, through tasks where it exports the report over a period of time rather than all in one go?
As you suspected, Sprout Reports is not designed to handle large quantities of data if it's more than your server can handle. As for how many records you could export, it really just depends on how impressive your query is and how much your server can handle.

We could potentially consider adding support for batching large exports. I've created a ticket if you'd like to add your vote for it: Add support for batch exporting large data sets

For now, if you plan to do this on a regular basis you may want to invest in writing a script that makes this a bit easier to do or reach out and contract us to prioritize adding support for this feature.

Within the scope of optimizing the existing queries in your Twig template reports, you could potentially use techniques like:


Eager Loading.
Saving related data ahead of time using a field like the Preparse Field which could potentially reduce the need for complex joins when performing the actual query. 
Advanced Twig query techniques (I don't know where these are documented but Brandon mentioned them in his slides here).
Create custom variables or twig functions in your own custom plugins to help optimize how the queries are actually being handled.


Outside of optimizing the query, you could add date range (or some other) settings that lets you give the user control over reducing the size of the full query. There is an example of creating a date range field in the example templates provided in the plugin.