Commit 99b1483a authored by Nicolas Dumazet's avatar Nicolas Dumazet

revert changes to fallback to a naive and slow but safe implementation of isBuildable

This commit alone represents a performance drop by 300% (3 times slower),
and is kept only to track changes.
The next 5 commits will improve performance, leading to an
overall 500% improvement (5 times faster than before this commit)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36583 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7e6cbe1d
...@@ -382,17 +382,20 @@ class BusinessPath(Path, Predicate): ...@@ -382,17 +382,20 @@ class BusinessPath(Path, Predicate):
delivery_uid=[x.getUid() for x in explanation.getMovementList()]) delivery_uid=[x.getUid() for x in explanation.getMovementList()])
for simulation_movement in delivery_simulation_movement_list: for simulation_movement in delivery_simulation_movement_list:
applied_rule = simulation_movement.getRootAppliedRule().getPath() applied_rule = simulation_movement.getRootAppliedRule()
root_applied_rule_set.add(applied_rule) root_applied_rule_set.add(applied_rule)
simulation_movement_list = portal_catalog( simulation_movement_list = []
portal_type='Simulation Movement', causality_uid=self.getUid(), for applied_rule in root_applied_rule_set:
path=['%s/%%' % x for x in root_applied_rule_set]) simulation_movement_list.extend(self._recurseGetValueList(
applied_rule, 'Simulation Movement'))
return [simulation_movement.getObject() for simulation_movement self_url = self.getRelativeUrl()
return [simulation_movement for simulation_movement
in simulation_movement_list in simulation_movement_list
# related with explanation # related with explanation
if self._isDeliverySimulationMovementRelated( if simulation_movement.getCausality() == self_url and \
self._isDeliverySimulationMovementRelated(
simulation_movement, delivery_simulation_movement_list)] simulation_movement, delivery_simulation_movement_list)]
def getExpectedQuantity(self, explanation, *args, **kwargs): def getExpectedQuantity(self, explanation, *args, **kwargs):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment