Optimize observable ArrayList creation in FXCollections

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • jfx19
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: