try
{
swGlobal.start();
if (AbstractReportProcessor.logger.isDebugEnabled())
{
AbstractReportProcessor.logger.debug(new MemoryUsageMessage(System.identityHashCode(
Thread.currentThread()) + ": Report processing time: Starting: "));
}
try
{
final long startTime = System.currentTimeMillis();
fireProcessingStarted(new ReportProgressEvent(this));
if (isPaginated() == false)
{
// Processes the whole report ..
prepareReportProcessing();
}
PerformanceLoggingStopWatch sw =
getPerformanceMonitorContext().createStopWatch(PerformanceTags.REPORT_GENERATE);
try
{
sw.start();
final long paginateTime = System.currentTimeMillis();
if (AbstractReportProcessor.logger.isDebugEnabled())
{
AbstractReportProcessor.logger.debug(new MemoryUsageMessage
(System.identityHashCode(Thread.currentThread()) +
": Report processing time: Pagination time: " + ((paginateTime - startTime) / 1000.0)));
}
if (getLogicalPageCount() == 0)
{
throw new EmptyReportException("Report did not generate any content.");
}
// Start from scratch ...
PageState state = getLogicalPageState(0);
while (state != null)
{
state = processPage(state, true);
}
final long endTime = System.currentTimeMillis();
if (AbstractReportProcessor.logger.isDebugEnabled())
{
AbstractReportProcessor.logger.debug(new MemoryUsageMessage
(System.identityHashCode(Thread.currentThread()) +
": Report processing time: " + ((endTime - startTime) / 1000.0)));
}
}
finally