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

Optimize observable ArrayList creation in FXCollections

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • jfx19
    • None
    • javafx
    • None
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: