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

MemoryLeak in TreeView$TreeViewBitSetSelectionModel.selectedIndicesSeq

XMLWordPrintable

      TreeView$TreeViewBitSetSelectionModel.selectedIndicesSeq.observers list constantly grows
      every time we do expand/collapse TreeView.
      The problem always existed but was noted only after RT-15312 "Inefficient implementation of TreeItem expand/collapse"
      has been fixed (in b2563). This performance improvement did speed up the memory leak.

      As result max memory usage of Controls.TreeView-Expand benchmark is increased significantly in b2563
      comparing to b2561:
        http://aurora.russia.sun.com/performance/faces/ChessBoard.xhtml?reportName=FX2-graphics-scrum&parameters=%5Bshownbenchmarks%5D%28benchmarkresults.name+%3D+%27Controls.TreeView-Expand%27%29OR%28benchmarkresults.name+%3D+%27Controls.TreeView-Expand.JFX_PULSES%27%29OR%28benchmarkresults.name+%3D+%27Controls.TreeView-Expand.MAX_MEMORY_USAGE%27%29%5Brefrelease%5D2.0%5Brefbuild%5D%3D+%272561%27%5Brefjdkrelease%5D1.6.0_23%5Brelease%5D%28pr.product.productRelease+IS+NOT+NULL%29%5Bbuild%5D%28pr.product.build+%3D+%272561%27%29OR%28pr.product.build+%3D+%272563%27%29%5Bjdkrelease%5D%28jdk.product.productRelease+IS+NOT+NULL%29&splitting=%5BX+axis%5DfxConf%2C+metricName%5BComplement%5Dbenchmark%2C+jdkBuild%2C+jdk%5BY+axis%5DbenchmarkName%2C+benchmarkConf%2C+fxRelease%2C+fxBuild%5BZ+axis%5Dos%2C+hwclass%2C+jdkRelease%2C+benchmarkSuite&reference=%5BOthers%5DfxRelease%2C+fxBuild%2C+jdkRelease%2C+jdkBuild%2C+jdk%2C+benchmarkSuite%2C+benchmarkName%2C+metricName%5BReference+Set%5Dbenchmark%2C+os%2C+benchmarkConf%2C+fxConf%2C+hwclass&mixReference=false&flags=&significance=empty&hideDataConfiguration=false&calculateSummary=false&showSummaryExpanded=false&showSummaryContents=true&showComplementAttributes=false&compactTables=true&viewStyle=chessboard&filter=


      Running Controls.TreeViewExpand test for 30 seconds results in 14,858 elements in
      TreeView$TreeViewBitSetSelectionModel.selectedIndicesSeq.observers.

      The simplified test case to demonstrate the problem is attached.
      The test fails with OOM in less than one minute in case of small heap size.
      > java -Xmx32m -verbose:gc -cp "rt/lib/jfxrt.jar" TreeViewExpandPerfTest

      Note, the test just does expand/collapse tree view on every pulse without any objects allocation.
      So, no any memory growth/leak should be observed at all.

            jgiles Jonathan Giles
            epavlova Ekaterina Pavlova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: