Bug 209905 OutOfMemoryError was detected when rendering large excel report
report designs: 20 columns, no group, 25 rows x 5000 pages heap size settings: -Xms512m -Xmx1024m via profiling the execution it's found that ExcelLayoutEngine cached 125000 data rows in memory, while ExcelEmitter could output no more than 65525 data rows(the upper limit). so in this case, only 65525 data rows should be cached, the rest should be discarded. if reducing the amount of data rows to 65525, the OutOfMemoryError was gone. However render such a report requiring at least 512m heap size, which is quite large somehow.
engine/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/layout/ExcelLayoutEngine.java
Rule rule = getCurrentContainer( ).getRule( );
		int start = rule.getStart( );
		int end = rule.getEnd( );
		int startcol = axis.getCoordinate( start );
		int endcol = axis.getCoordinate( end );
		int max = 0;
		int len[] = new int[endcol - startcol];
		for ( int i = startcol; i < endcol; i++ )
		{
			int columnsize = cache.getColumnSize( i - detal );
			len[i - startcol] = columnsize;
			max = max > columnsize ? max : columnsize;
		}
		for ( int i = startcol; i < endcol; i++ )
		{
			int rowspan = max - len[i - startcol];
			int last = len[i - startcol] - 1;
			if(rowspan > 0)
			{				
				Object data = null;				
				Object upstair =  cache.getData( i - detal, last );
				
				if ( upstair != null && upstair != waste )
				{
					Data predata = (Data) upstair;
					int rs = predata.getRowSpan( ) + rowspan;
					predata.setRowSpan( rs );
					data = predata;
				}
				else