Browse Source

Optimized model_split when no output models

Yentl Van Tendeloo 8 years ago
parent
commit
cc5386e3bd
1 changed files with 5 additions and 0 deletions
  1. 5 0
      bootstrap/model_management.alc

+ 5 - 0
bootstrap/model_management.alc

@@ -221,6 +221,11 @@ Element function model_join(models : Element, metamodel : Element, tracability_m
 	return new_model!
 	
 Element function model_split(merged_model : Element, models : Element, tracability : Boolean):
+	if (read_nr_out(models) == 0):
+		// No results needed, so stop immediately unless tracability is True
+		if (bool_not(tracability)):
+			return create_node()
+
 	Element result
 	Element metamodel
 	Element model_tuple