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

[TreeItem] Instantiation of TreeItem's is very expensive

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • 8u11
    • javafx
    • 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

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Imported: