teodord wrote: So we optimized memory consumption in JasperReports by using a report virtualizer, but we cannot do the same for the exporters, because we rely on third-party libraries such as POI or JExcelAPI which do not seem to have similar mechanisms. I was running into the same issue, so I took a look at JRXlsAbstractExporter. I believe I have come up with an approach that optimizes memory consumption even when IS_ONE_PAGE_PER_SHEET is false. The approach basically consists of making two passes over the pages in exportReportToStream. The first pass simply calculates all the xCut values. On the second pass, exportPage is called once per page rather than once at the end. The pre-calculated xCut values are passed to exportPage, and then on to the JRGridLayout constructor. JRGridLayout need only calculate the yCut values for that page. It can use the pre-calculated xCut values. This allows each page to be exported as it is hit rather than all elements on all pages being collected and exported at one time. This seems to work well for me, however, there may be side-effects that I haven't considered. I can provide the modified source code if this is something that interests you.