Mworks data extraction

Hi Chris,

Quick not-so-important question: do you know if there is substantial speed difference between performing multiple calls to getEvents to get single variables, vs. one call to getEvents to get multiple variables, assuming the same total number of events?

Thanks,
Evan

Hi Evan,

Theoretically, a single call should be more efficient than multiple calls, as there’s some overhead associated with opening the data file each time, and extracting each variable separately may result in multiple scans through certain blocks of the file. However, I haven’t done any tests to confirm this, and whether the time difference is substantial may depend on how many events you’re extracting and how they’re distributed throughout the file. Also, if you get all the events at once, then you’re subject to the additional time and memory overhead of sorting them in to separate arrays for each variable.

Maybe just try it and see what happens?

Chris