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

Optimize observable ArrayList creation in FXCollections

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • jfx19
    • javafx
    • None
    • generic
    • generic

    Description

      The observable ArrayList creation in FXCollections can be optimized by using the ArrayList constructor directly instead of calling addAll(..).
      The advantage of the ArrayList constructor is that it will create an array with the correct size directly, while addAll(..) needs to grow the array first.

      This will especially speed up the creation of big observable ArrayLists which may be used for e.g. (Tree)TableView or ListView.

      Attachments

        Issue Links

          Activity

            People

              mhanl Marius Hanl
              mhanl Marius Hanl
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: