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

[TreeItem] Instantiation of TreeItem's is very expensive

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8u11
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
    • Environment:

      Mac Mini Late 2012

      Description

      Hi All,

      I want to display in TreeView 1-2M (may be more) items. During experiments with TreeView I found that instantiation of TreeItems is very expensive operation and take a lot of time.

      Instantiate Objects: 0.12657099962234497 sec.
      Instantiate ArrayLists: 0.19151298701763153 sec.
      Instantiate HashMaps: 0.21388199925422668 sec.
      Instantiate TreeItems: 11.619612693786621 sec.

      As you can see the instantiation of 1M of TreeItems in ~60 times slowly than ArrayLists or HashMaps. Is it possible to make instantiation of TreeItems less expensive?

      Here is code for reproduce this problem: https://gist.github.com/maxd/4ffc557851fab9f12e80

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: