Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-13355

Performance Impact of User Task Form Key expressions

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • engine
    • None

      Acceptance Criteria (Required on creation):

      Either of the following options

      • the form keys are not initialized per se for Task Queries in the REST API
      • the potential performance impact of this behavior is well-documented

      Hints (Optional):

      The flag initializeFormKeys is enabled for Task Queries in the


      Original Description:

      When a task or list of tasks is queried  (such as the Camunda /tasks endpoint or the Camunda Tasklist app), if a task has a Form Key which is a expression, the expression is evaluated for every task that is returned in the list.

      There needs to be a big documentation notification about this implication: Users can use variables to store a dynamic form key.  But the implications are not clear: Every single task has a initialization of the form key.

      In the Camunda Tasklist app, there is auto refresh that occurs of you leave task list open... and so if enough users have this open, there is a exponential performance impact.

      Very likely this should be seen as a bug/performance impact feature that should move form key initialization as an optional item in the API response, and the Camunda Tasklist only initializes the form key when the user selects the task.

      You can observe the behaviour by placing a breakpoint at:

      https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/delegate/ExpressionGetInvocation.java#L40

        This is the controller panel for Smart Panels app

            [CAM-13355] Performance Impact of User Task Form Key expressions

            Stephen Russett created issue -
            Tobias Metzke-Bernstein made changes -
            Assignee New: Tobias Metzke-Bernstein [ tobias.metzke ]
            Tobias Metzke-Bernstein made changes -
            Link New: This issue is related to CAMTEAM-157 [ CAMTEAM-157 ]

            Hey StephenOTT,

            thanks for bringing this up, we will have a closer look at this and get back to you with feedback as soon as possible.
            Please note that due to current preparations for the next minor release of the Camunda Platform this might take a bit longer than usual.

            Best,
            Tobias

            Tobias Metzke-Bernstein added a comment - Hey StephenOTT , thanks for bringing this up, we will have a closer look at this and get back to you with feedback as soon as possible. Please note that due to current preparations for the next minor release of the Camunda Platform this might take a bit longer than usual. Best, Tobias
            Tobias Metzke-Bernstein made changes -
            Mentioned Roles
            Tobias Metzke-Bernstein made changes -
            Mentioned Groups
            Tobias Metzke-Bernstein made changes -
            Mentioned Roles
            Tobias Metzke-Bernstein made changes -
            Mentioned Groups
            Tobias Metzke-Bernstein made changes -
            Description Original: When a task or list of tasks is queried  (such as the Camunda /tasks endpoint or the Camunda Tasklist app), if a task has a Form Key which is a expression, the expression is evaluated for every task that is returned in the list.

            There needs to be a big documentation notification about this implication: Users can use variables to store a dynamic form key.  But the implications are not clear: Every single task has a initialization of the form key.

             

            In the Camunda Tasklist app, there is auto refresh that occurs of you leave task list open... and so if enough users have this open, there is a exponential performance impact.

             

             

            Very likely this should be seen as a bug/performance impact feature that should move form key initialization as an optional item in the API response, and the Camunda Tasklist only initializes the form key when the user selects the task.

             

            You can observe the behaviour by placing a breakpoint at:

            https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/delegate/ExpressionGetInvocation.java#L40
            h4.  
            New: h4. Acceptance Criteria (Required on creation):

            Either of the following options
             * the form keys are not initialized per se for Task Queries in the REST API
             * the potential performance impact of this behavior is well-documented

            h4. Hints (Optional):

            The flag {{initializeFormKeys}} is enabled for Task Queries in the
            * REST API for [Task Queries|https://github.com/camunda/camunda-bpm-platform/blob/333bb98a871b8056c0c0b82d9d5b6d73c446a780/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/impl/TaskRestServiceImpl.java#L110]
            * Filter Queries [in general|https://github.com/camunda/camunda-bpm-platform/blob/333bb98a871b8056c0c0b82d9d5b6d73c446a780/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractExecuteFilterCmd.java#L69]
            * it might make sense to only keep it activated for fetching single tasks [in the REST API|https://github.com/camunda/camunda-bpm-platform/blob/333bb98a871b8056c0c0b82d9d5b6d73c446a780/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/sub/task/impl/TaskResourceImpl.java#L437]
             

            ----
            *Original Description:*

            When a task or list of tasks is queried  (such as the Camunda /tasks endpoint or the Camunda Tasklist app), if a task has a Form Key which is a expression, the expression is evaluated for every task that is returned in the list.

            There needs to be a big documentation notification about this implication: Users can use variables to store a dynamic form key.  But the implications are not clear: Every single task has a initialization of the form key.

            In the Camunda Tasklist app, there is auto refresh that occurs of you leave task list open... and so if enough users have this open, there is a exponential performance impact.

            Very likely this should be seen as a bug/performance impact feature that should move form key initialization as an optional item in the API response, and the Camunda Tasklist only initializes the form key when the user selects the task.

            You can observe the behaviour by placing a breakpoint at:

            [https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/delegate/ExpressionGetInvocation.java#L40]
            Tobias Metzke-Bernstein made changes -
            Mentioned Roles

              Unassigned Unassigned
              StephenOTT Stephen Russett
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: