Optimize pipeline creation
emptybutton opened this issue · 0 comments
emptybutton commented
Each new use of |then>>
creates a separate instance of ActionChain
, which must each time combine all functions in a pipeline into a separate function and since it does this using bind
, then only the number of calls to bind
is n**2 / 2
, where n
is the number of atomic functions in a pipeline.
Head-on solution: initialize _main_action
only if a pipeline (ActionChain
) is called and add a special initialization mode for ActionChain
when it is created via |then>>
operator (_ActionChainInfix
).