(02-21-2020, 03:28 PM)remkonoteboom Wrote: 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).
I found the solution how to avoid editing tactic sources, and using TEL.
There is script_path in file_naming.py!
This is really handy and portable, also almost 3x faster than my TEL variant.
Example code:
I am not surprised. TEL's primary design was not to be fast, but to be very convenient. It doesn't handle complex logic and is not the best if you need to evaluate it thousands of times. At some point, it will always be faster to use targeted python logic.