← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13871: Improve performance on org unit selection during login

 

------------------------------------------------------------
revno: 13871
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-01-27 19:21:37 +0200
message:
  Improve performance on org unit selection during login
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.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-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java	2013-09-09 08:02:21 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java	2014-01-27 17:21:37 +0000
@@ -300,6 +300,7 @@
             if ( rootUnits.contains( selectedUnit ) )
             {
                 unitsInTree.add( selectedUnit );
+                continue;
             }
 
             OrganisationUnit parent = selectedUnit.getParent();

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java	2014-01-27 17:21:37 +0000
@@ -133,8 +133,7 @@
         }
 
         // ---------------------------------------------------------------------
-        // Reload the units to ensure it is loaded within the current
-        // transaction
+        // Reload the units to ensure it is loaded within the current session
         // ---------------------------------------------------------------------
 
         Collection<OrganisationUnit> reloadedSelectedUnits = reloadOrganisationUnits( selectedUnits );
@@ -259,6 +258,7 @@
             if ( rootUnits.contains( selectedUnit ) )
             {
                 unitsInTree.add( selectedUnit );
+                continue;
             }
 
             OrganisationUnit parent = selectedUnit.getParent();