Hi All,
I have a question regarding what is best practice regarding when to use 'Wait(0)' command in a JSL script.
I guess there are times when your script can get ahead of itself in terms of executing code before a previously scripted operation has completed, and putting a wait(x) command after such operations is one way of trying to ensure that the operation completes before continuing with your script.
I'm just wondering when should you be concerned about this? For example, if I'm splitting a datatable, do I need a wait(0)? How about sending a '<<Select Where()' message to a datatable? Its just that I'm finding this kind of information hard to come by, and it seems that you just have to run into certain problems before you know when its required?
Also, whats best practice when it comes to using a Wait(0)? I know in the case of waiting for formulae to evaluate in a dt, you would be better served by sending a '<< Run Formulas' message to a datatable instead of using a wait(0), but its not so clear cut in other circumstances.
Apologies if this seems a rather broad/vague discussion. It's stemming from the fact that I'm trying to improve the execution time of a script I have, and the profiler is saying that a lot of time is being spent on these wait commands that I've inserted after the type of operations mentioned above. I appreciate any insight into this or if there are resources available that I can look at, even better. Cheers!