Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8320664

Performance issue with large JTree on macOS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • tbd
    • 8u351, 11.0.17-oracle, 17.0.2, 18, 21, 22
    • client-libs

      Creating a large JTree takes very long on macOS (works fine on Linux and ok on Windows).

      The test program TestLargeTree.java creates 500 top-level nodes and adds 5000 nodes in each level. The top-level nodes are closed at the start. Top-level and first-level works, but opening the nodes on the first-level (showing the third-level nodes) takes more than 2 minutes. This behavior is sometimes observable when opening the top-level nodes too.

      I captured two flame-graphs with async-profiler of this: flames2.html and profile.html

      It causes additionally an OutOfMemory exception using 4GB of RAM. Increasing the heap size with -Xmx helps, as long as one doesn't open more than one node on the second level.

        1. flames2.html
          257 kB
        2. profile.html
          123 kB
        3. TestLargeTree.java
          3 kB
        4. TestLargeTree-1.java
          3 kB

            abhiscxk Abhishek Kumar
            jbechberger Johannes Bechberger
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: