I started to optimize my projects, and in order to reduce the size of the project tree I rewrote many components to their @ variants in expressions. For example:
The functionality is not so obvious from the project tree, but it is more "consistent" and there's the possibility to use local variables, ifs, fors, switches, etc.
My question is: what's the performance of @ script commands - better, worse, or the same as the original components?
Rado1 wrote:I started to optimize my projects, and in order to reduce the size of the project tree I rewrote many components to their @ variants in expressions.
The filesize of your zgeproj won't differ much one way or another. It's purely a aesthetic preference if you prefer tree-based components or expression-based component-calls.
Rado1 wrote:My question is: what's the performance of @ script commands - better, worse, or the same as the original components?
It's identical. Besides, the component overhead will generally only account for a neglectable sliver of the entire performance footprint.
Thank you Ville, I like line numbers. The only remaining thing is to extend expression syntax error messages to show line numbers. And maybe one additional improvement: allow to change font size in expression editor (e.g. by context menu or in Settings).
I've now added line/column info to scripting parser errors so it will say "invalid primary (line:x, col:y)" and similar. Download the beta again. It won't affect all messages though because some error messages are from the code generation phase and by that time the line/col information is no longer available. Let me know if you get many errors without line numbers and I can try to find a way to improve it.