[Erp5-report] r36587 nicolas.dumazet - /erp5/trunk/products/ERP5/Document/
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jun 25 12:29:29 CEST 2010
Author: nicolas.dumazet
Date: Fri Jun 25 12:29:27 2010
New Revision: 36587
URL: http://svn.erp5.org?rev=36587&view=rev
Log:
To compute a movement buildability, we only examine nodes that are
ancestors or descendants of said movement.
Instead of computing a closure of a set of nodes, and in a second step
filter nodes to only match those "related" to self, it's better to
compute directly a smaller closure, only consisting of [self]
That's about 3-4 times faster.
Modified:
erp5/trunk/products/ERP5/Document/SimulationMovement.py
Modified: erp5/trunk/products/ERP5/Document/SimulationMovement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/SimulationMovement.py?rev=36587&r1=36586&r2=36587&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/SimulationMovement.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/SimulationMovement.py [utf8] Fri Jun 25 12:29:27 2010
@@ -567,13 +567,7 @@ class SimulationMovement(Movement, Prope
# first one, can be built
return True
- portal_catalog = self.getPortalObject().portal_catalog
-
- delivery_simulation_movement_list = portal_catalog(
- delivery_uid=[x.getUid() for x in explanation_value.getMovementList()])
-
- simulation_movement_list = business_path.getBusinessPathClosure(
- delivery_simulation_movement_list)
+ simulation_movement_list = business_path.getBusinessPathClosure([self])
# store a causality -> causality_related_movement_list mapping
causality_dict = dict()
@@ -587,14 +581,12 @@ class SimulationMovement(Movement, Prope
completed_state_list = parent_path.getCompletedStateList()
for business_path_movement in related_simulation_list:
- if parent_path.isMovementRelatedWithMovement(self,
- business_path_movement):
- business_path_movement_delivery = business_path_movement \
- .getDeliveryValue()
- if business_path_movement_delivery is None:
- return False # related movement is not delivered yet
- if business_path_movement.getSimulationState() not in completed_state_list:
- return False
+ business_path_movement_delivery = business_path_movement \
+ .getDeliveryValue()
+ if business_path_movement_delivery is None:
+ return False # related movement is not delivered yet
+ if business_path_movement.getSimulationState() not in completed_state_list:
+ return False
return True
def getSolverProcessValueList(self, movement=None, validation_state=None):
More information about the Erp5-report
mailing list