02-21-2020, 03:28 PM
This naming "expression":
"{parent.code}/versions/{sobject.code}"
doesn't actually use the expression parser.
The function that handles this is "naming_to_dir()" in the file "src/pyasm/biz/naming.py". If you look at the function, it will check to see if the value in the parenthesis either starts with a $ or @ and assumes an expression. It will then go through the overhead of parsing the expression which has some overhead. If not, it goes through a bunch of "if" statements to evaluate things like "sobject.code" directly (which is much faster).
The reason there are two types of "expressions" in the naming is that naming conventions existed long before TEL (file naming conventions was actually a precursor to the design of TEL). We later on updated the naming conventions to handle full expressions while trying to maintain full backwards compatibility.
"{parent.code}/versions/{sobject.code}"
doesn't actually use the expression parser.
The function that handles this is "naming_to_dir()" in the file "src/pyasm/biz/naming.py". If you look at the function, it will check to see if the value in the parenthesis either starts with a $ or @ and assumes an expression. It will then go through the overhead of parsing the expression which has some overhead. If not, it goes through a bunch of "if" statements to evaluate things like "sobject.code" directly (which is much faster).
The reason there are two types of "expressions" in the naming is that naming conventions existed long before TEL (file naming conventions was actually a precursor to the design of TEL). We later on updated the naming conventions to handle full expressions while trying to maintain full backwards compatibility.