Skip to content

Select processing of large groups of selects takes too long #436

@Westbrook

Description

@Westbrook

Description

Not sure if this is ultimately an iron-list, or an array-selector, or a further up, issue, but selecting large groups of content, whether by the technique outlined in #124 or in #361 takes an inordinate amount of time. Explicitly, I'm seeing ~10s processing times for lists of 5000 items. I understand that's a lot of items, BUT that still seems crazy long.

My research points to this coming from the way selectItem applied code from array-selector When you follow that into the array-selector, you can see that it's pushing into it's selected array the subsequent property effects of which seems to be the cause of the processing delay.

Expected outcome

Selecting a large amount of items takes an virtually indistinguishably longer time than selecting one or a few.

Actual outcome

Selecting 5000 items at a time causes a ~10s block on the main thread.

Live Demo

https://jsbin.com/tobosaleki/1/edit?html,console,output

Steps to reproduce

  1. Visit the JS Bin demo
  2. Click 'select all'
  3. Wait, see the window.performance based timing display on completion
  4. Click 'select none'
  5. Wait, a really small amount of time, see the window.performance based timing display on completion
  6. Be in awe at the difference

Browsers Affected

  • All

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions