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

FlameGraphView tree calculation should (probably) be interruptable

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 8.0.0
    • None
    • Mission Control Client
    • None

      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.

            mwengner Miro Wengner
            jkang Jie Kang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: