Home AMX User Forum NetLinx Studio

Command overhead

Is there a document that details the various overhead associated with each netlinx command?

The example I came up with in chat was: If I have a button event that converts an integer to ascii (ITOA() ) twice, am I better off doing the conversion once and storing it in a variable and then referencing the variable throughout the button event, or should I just use ITOA() twice?

Jeff

Comments

  • dchristodchristo Posts: 177
    I'd be interested in seeing such a document as well.

    --D
  • DHawthorneDHawthorne Posts: 4,584
    My rule-of-thumb is if I have to use it more than once, I store it in a variable. The amount of resources needed to call a function are probably very small, and probably don't vary a whole lot since most of the keyword functions are pretty basic. But it's still got to be more than memory space allocation for the variable, where all you need for subsequent passes is to read the memory location.

    In the grand scheme of things, the processor can handle an awful lot of function calls without breaking a sweat, so it probably doesn't matter unless your useage is extreme. I'm just a little old-school about resource management.
Sign In or Register to comment.