Commit ea2a30cf authored by Nicolas Dumazet's avatar Nicolas Dumazet

The two loops are independant. Move the more expensive call as the outer loop



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30322 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0d807d0d
......@@ -256,10 +256,10 @@ class Measure(XMLMatrix):
# variation_category.
variation_list = [(regex_list + [variation_category, '\n'],
variation_base_category_list + [variation_category])
for regex_list, variation_base_category_list in variation_list
for variation_category in resource.getVariationCategoryList(
base_category_list=(variation_base_category,),
omit_individual_variation=0)
for regex_list, variation_base_category_list in variation_list]
omit_individual_variation=0)]
else:
variation_base_category_regex = variation_base_category + '/[^\n]+\n'
if variation_base_category in optional_variation_base_category_set:
......
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