Slowdown because of height calculation

1 posts, 0 answers
  1. Rafa
    Rafa avatar
    13 posts
    Member since:
    Jan 2013

    Posted 07 Jan 2015 Link to this post

    Hi there

    This is more a kind of bug, but I found no way to create a ticket....

    I'm using the multiselect widget to let the user select multiple or all persons. We're talking about around 300 - 400 entries. In some cases all persons need to be selected. So I get all the data items and set them with the value() method on the widget. But this takes "ages" (2-3 sec) and even leads to no responding script error on some computers. Firebug profiler revealed, that about half of the needed time is consumed by the _select() method of the multiselect better said, its "that._height(that._visibleItems);"  line. If I move this line to the value() method and insert it after the select loop, the time consumption drops by more than half.

    I don't see a reason why the height needs to be calculated on every loop step. But this is probably needed in some other cases. Still I would recommend to make this more streamline by calculating the height after value setting has completed.
Back to Top