Passing parameters to macros and effectivity
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-02-02 11:26 AM
2010-02-02
11:26 AM
How much does the nested macro calls affect the responsiveness of the object?
I mean that if you have ten arrays of [50][150] in the first objects and you pass them to the first macro and then to the nested second macro, does such operations take more memory and time than if you would try to limit the arrays passed to the subobjects?
(like 10 items of one dim array of [150] instead of 10 items of [50][150] )
Hope I'm clear enough
Thanks in advance,
Olivier
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-02-02 07:12 PM
2010-02-02
07:12 PM
I'm afraid this should be tested to get a definite answer:(
According to the macro calling logic in ArchiCAD, the size of the arrays should matter much less than the amount of parameters and the order of parameters. Passing each parameter does a name based search for the actual parameter in the parameter list of the called macro and a copy of values. This search used to be a relevant factor in macro calling speed in ArchiCAD. This search has been improved for AC13 a lot but having less parameters will make things faster - that's for sure.
In general, I think having fewer but bigger arrays is better if the overall size is the same.
HTH,
According to the macro calling logic in ArchiCAD, the size of the arrays should matter much less than the amount of parameters and the order of parameters. Passing each parameter does a name based search for the actual parameter in the parameter list of the called macro and a copy of values. This search used to be a relevant factor in macro calling speed in ArchiCAD. This search has been improved for AC13 a lot but having less parameters will make things faster - that's for sure.
In general, I think having fewer but bigger arrays is better if the overall size is the same.
HTH,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-02-02 10:46 PM
2010-02-02
10:46 PM
Thanks Zsolt for the clear and honest answer!
If i get it right then I can conclude that:
1- bigger arrays are no big deal
2-using the old CALL method giving parameters by order rather than by name can make things faster
That's good to know!
I'll try to adapt my script to this,
kind regards,
olivier
If i get it right then I can conclude that:
1- bigger arrays are no big deal
2-using the old CALL method giving parameters by order rather than by name can make things faster
That's good to know!
I'll try to adapt my script to this,
kind regards,
olivier

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2010-02-04 03:18 PM
2010-02-04
03:18 PM
1 - Basically, yes.
2 - I prefer the macro call syntax with named parameters since you lose track very soon with many parameters the other way - not to mention the case of intentionally omitting parameters. I just suggest you to keep the named parameters in the order of the definition to speed up the pairing up.
Regards,
2 - I prefer the macro call syntax with named parameters since you lose track very soon with many parameters the other way - not to mention the case of intentionally omitting parameters. I just suggest you to keep the named parameters in the order of the definition to speed up the pairing up.
Regards,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...