Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Performance: multiple select triggers reflows #1361

Open
@naltatis

Description

@naltatis

I noticed that the multiple-select significantly slows down performance because it forces the browser to recalculate the layout. On a page with many select elements the impact is huge and blocks the browser for quite a while.

I've compiled a plunker showing this effect:
http://plnkr.co/edit/DpBir51UqvBjR8hZzfsf?p=preview

ui-select

The calculation is triggered from the uiSelectMatch link function:

if($select.multiple){
    $select.sizeSearchInput();
}

When I comment out these lines the sample code gets rendered 3x faster.
ui-select-optimised

It does not seem to effect functionality. The size of the input does not change. Am I missing something here?

naltatis

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions