Bug 147101 Report generation performance is sluggish
The overall performance of report generation appears to be quite sluggish. Here are numbers that we have measured using ORACLE as a DB. We use ORACLE 10g w/ojdbc14.jar thin driver. select rownum, datetime_id, another_id, text from ( select max(datetime_id) as datetime_id, another_id, text from some_oracle_schema.sample_table where text < 'c%' group by another_id, text ) Query resulting in 8465 rows Using PL/SQL developer: ----------------------- Execution: approx 1 second Iterating through all rows via PL/SQL developer UI: 10 seconds BIRT: ----- Preview page (via dataset editor): shows all 8465 rows in 53 seconds Preview tab (in the designer): shows all 8465 rows in 79 seconds Generation of rptdocument from rptdesign using API: 55 seconds
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/transform/group/GroupCalculationUtil.java
*/
	public ICachedObject createInstance( Object[] fields )
	{
		GroupBoundaryInfo groupBoundaryInfo = new GroupBoundaryInfo( ( (Integer) fields[0] ).intValue( ),
				( (Integer) fields[1] ).intValue( ) );
		Object[] sortKeys = null;
		int sortKeysTotalLength = 1;
		if ( fields[2] != null )
		{
			sortKeys = new Object[( (Integer) fields[2] ).intValue( )];
			System.arraycopy( fields, 3, sortKeys, 0, sortKeys.length );
			sortKeysTotalLength = sortKeys.length + 1;
		}
		
		boolean[] sortDirections = null;
		if ( fields[2 + sortKeysTotalLength] != null )
		{
			sortDirections = new boolean[( (Integer) fields[2 + sortKeysTotalLength] ).intValue( )];
			
			for ( int i = 0; i < sortDirections.length; i++ )
			{
				sortDirections[i] = ( (Boolean) fields[3 + sortKeysTotalLength + i ] ).booleanValue( );
			}
		}
		groupBoundaryInfo.setSortCondition( sortKeys, sortDirections );
		
		groupBoundaryInfo.setAccepted( ( (Boolean) fields[fields.length - 1] ).booleanValue( ) );
		return groupBoundaryInfo;
	}
}