Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-79126

Webhook payload generation is slow due to lack of caching in comment serialization

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 9.12.0, 10.3.0, 10.3.12, 11.0.0, 11.1.1
    • Webhooks
    • None

      Issue Summary

      When Jira serializes issue payloads for webhooks, the request cache is closed before the comment serialization phase begins. As a result, comment serialization does not benefit from caching, and each comment’s permission check is performed individually against the database. This can lead to significant performance degradation, especially in environments with complex permission schemes (such as nested group relationships).

      While the lack of caching is not always problematic for the comments themselves, the repeated permission checks can be extremely slow in certain configurations, causing delays in webhook payload generation and increased database load.

      Steps to Reproduce

      1. Configure Jira with complex permission schemes (e.g., nested groups, large user directories).
      2. Create an issue and add a large number of comments.
      3. Trigger a webhook event for the issue (e.g., issue updated, comment added).
      4. Observe the time taken to generate and deliver the webhook payload, and monitor database activity related to permission checks.

      Expected Results

      Webhook payloads are generated efficiently, with permission checks for comments utilizing caching to minimize redundant database queries.

      Actual Results

      Webhook payload generation is slow. Profiling shows that permission checks for each comment are performed without caching, resulting in repeated and expensive database queries.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Unassigned Unassigned
              drauf Daniel Rauf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: