Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1746

Chosen box with huge data - Performance issue

    XMLWordPrintable

Details

    Description

      When using chosenbox with huge data as in the example provided there is a potenially big performance issue.
      The example logs all calls to getElementAt() in the custom ListModel implementation.

      steps to reproduce:
      1. focus the chosenbox inputcomponent
      2. type "aa" (dropdown appears, with 10 items ("aa0" - "aa9") -> OK - getElementAt() called for these 10 items)
      3. select e.g. "aa3" using keyboard press [return]-key
      4. press [tab] so enter the next input component
      5. press [shift+tab] to return to the chosenbox component
      --> getElementAt() will be called 50000 times (the return value of getSize() of ListModel) !!!
      --> getElementAt() will be called again 13324 times (basically called from 0 through index of previously selected item)

      6. start typing again e.g. "b"
      --> getElementAt() in list model will be called another 13324 times

      --> (dropdown appears, with 10 items -> OK - getElementAt() called for these 10 items)

      the numbers will increase as the models size returns larger size, or items with higher index are selected

      Attachments

        Issue Links

          Activity

            People

              jumperchen jumperchen
              cor3000 cor3000
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: