Slowdown because of height calculation

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

    Posted 07 Jan 2015 Link to this post

    Yey, just lost my bugreport... So once again

    Hi there

    I'm using the multiselect inside a form to allow the selection of persons. Where talking about 300 - 400 entries. In some cases it is needed, that all persons can be selected. So I added a Function which gets all dataSource entries and sets them as value.

    Unfortunately this takes "ages" (about 2-3 sec) and on some workstations even leads to a script timeout. Running Firebug profile, I found out that this is caused by the _select() method of the multiselect widget. In particular by the "that._height(that._visibleItems);" which is, caused by the array loop, called for every data item. If I move this line to the value() method and insert it after the select loop, consumed time drops almost by half.

    I don't see why the height needs to be calculated on every data item. I couldn't detect any side effects yet, but maybe there are. Still I would suggest to move the height calculation from the _select() method.
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 08 Jan 2015 Link to this post

    Hello Patric,

    The _select() method is used in other scenarios different than the call from the value() method, this is why the height calculation is needed for every _select() call. However the following enhancement if implemented, will give performance boost. So please check when this is resolved:

    https://github.com/telerik/kendo-ui-core/issues/465 

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Rafa
    Rafa avatar
    13 posts
    Member since:
    Jan 2013

    Posted 08 Jan 2015 in reply to Kiril Nikolov Link to this post

    Thank you for the fast reply. I will keep an eye on it.
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 08 Jan 2015 Link to this post

    Hello Patric,

    Glad I helped.

    In case you have any further questions, please do not hesitate to contact us.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready