Uploaded image for project: 'Java Mission Control'
  1. Java Mission Control
  2. JMC-6669

FlameGraphView tree calculation should (probably) be interruptable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 8.0.0
    • Component/s: Mission Control Client
    • Labels:
      None

      Description

      The current model creation uses CompletableFuture which is thread agnostic and does not trigger thread interrupts when cancelling. This means when consecutive selection states are fired (user selects MemoryPage and then selects Method Profiling page), even though the previous CompletableFuture is cancelled, the thread (executing TraceTreeUtils.createTree) continues until completion with the results discarded immediately after. Together with the FixedThreadPool of size 1, this becomes a bottleneck on larger sets of items as the next execution is delayed until the previous one completes.

       

      It would help to (safely) interrupt the calculation immediately to remove this bottleneck and not have wasted execution.

       

      To keep in mind when resolving this is that 1 to 4 selection state events are immediately & consecutively fired on a "single" user action, with sometimes different item sets for each.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mwengner Miro Wengner
                Reporter:
                jkang Jie Kang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: