Forum Discussion

walkerline117's avatar
walkerline117
Contributor
8 years ago

Execution time on non-execution route with router

Hi,

We have a router with below conditions

if input==true, then output 1
if input==false, then output 2

Lets say my input is false… so the snaps connected to router output2 will be fired and running.

However I found that at the sametime, the snaps connected to router output1 also has some execution time even though there’s no output from router output1.

Why is that?

Thanks

6 Replies

  • tstack's avatar
    tstack
    Former Employee

    The execution time includes time spent initializing and finalizing the snap. If the pipeline only runs for a short amount of time, the small amount of time needed to perform this overhead can appear to be significant. More complicated snaps might have to do more setup and teardown so they will show up even more. (Although, if this overhead time is quite large, there might be cause to look at optimizing it.)

    • walkerline117's avatar
      walkerline117
      Contributor

      I have sent you the pipeline id and screenshot…did you check and confirmed the case?

      • tstack's avatar
        tstack
        Former Employee

        Yes, I took a look at the execution and my response was based on that.

  • Did you see what the First Match checkbox does?

    The router conditions should be treated like the sequential If then else statements

    Obviously you can have multiple ifs.

    if cond1
    if cond2
    if cond3
    if cond4

    If you dont have the first match selected, all ifs will be evaluated.
    If first match selected, only one will be selected.

    Lets say none of the ifs match then the router will fail.
    so to have default, change that to

    if cond1
    if cond2
    if cond3
    if cond4
    true

    Try it out and let us know.

    • walkerline117's avatar
      walkerline117
      Contributor

      Thanks

      I did have the first match check box checked.

      Just add something, in my case, the snaps connected to output 1 has no input doc or output doc at all… but I still see execution time in states.