dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35524
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18184: Event analytics. Improved performance by removing unnecessary lookup of org unit levels.
------------------------------------------------------------
revno: 18184
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-02-05 19:58:22 +0100
message:
Event analytics. Improved performance by removing unnecessary lookup of org unit levels.
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java 2015-02-03 14:33:39 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java 2015-02-05 18:58:22 +0000
@@ -682,6 +682,8 @@
int level = ou.getLevel() != 0 ? ou.getLevel() : organisationUnitService.getLevelOfOrganisationUnit( ou.getId() );
+ ou.setLevel( level );
+
map.putValue( level, orgUnit );
}
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2015-02-05 18:58:22 +0000
@@ -429,15 +429,6 @@
}
}
- if ( params.hasDimensionOrFilter( ORGUNIT_DIM_ID ) )
- {
- for ( NameableObject object : params.getDimensionOrFilter( ORGUNIT_DIM_ID ) )
- {
- OrganisationUnit unit = (OrganisationUnit) object;
- unit.setLevel( organisationUnitService.getLevelOfOrganisationUnit( unit.getId() ) );
- }
- }
-
if ( asc != null )
{
for ( String sort : asc )