• Vincent Pelletier's avatar
    WorkflowTool: Accelerate action generation. · bba23043
    Vincent Pelletier authored
    Include worklist parameter generation in the scope of existing cache.
    Otherwise, it will be generated in pure loss if it is followed by a cache
    hit. Most of WorkflowTool change is just indentation change.
    
    Also, do some minor optimisations/simplifications in patchess.DCWorkflow.
    Some comments:
    - Guard_checkWithoutRoles return value is evaluated as a boolean, so no
      need to cast to int before returning based on boolean evaluation...
    - DCWorkflowDefinition.worklists is always true, even when empty.
    - Listing portal types per workflow requires checking all workflows, so
      build the whole mapping and cache it instead of caching for each workflow
      type individually (many more cache hits, fewer redundant computations)
    - getVarMatch is expensive just for a fallback and a wrap, bypass it to
      reduce redundant work.
    bba23043
DCWorkflow.py 32.5 KB