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
/**
 * The Comparator instance which is used to compare two GroupBoundaryInfo
 * instance.
 * 
 */
final class GroupBoundaryInfoComparator implements Comparator
{
	/**
	 * 
	 */
	public int compare( Object o1, Object o2 )
	{
		Object[] sortKeys1 = ( (GroupBoundaryInfo) o1 ).getSortKeys( );
		Object[] sortKeys2 = ( (GroupBoundaryInfo) o2 ).getSortKeys( );
		boolean[] sortDirection = ( (GroupBoundaryInfo) o1 ).getSortDirection( );
		int result = 0;
		for ( int i = 0; i < sortKeys1.length; i++ )
		{
			result = compareTwoValues( sortKeys1[i], sortKeys2[i] );
			if ( result != 0 )
			{
				if ( sortDirection[i] == false )
				{
					result = result * -1;
					break;
				}
			}
		}
		return result;
	}