Skip to content

DualListTreeSelect performance hit with large data sets #1151

Open
@dlabrecq

Description

@dlabrecq

Scope:

pf4-component-mapper
dual-list-tree-select

Description

Cost management users are encountering latency with our settings page when we have large data sets. For our cost-demo user on stage-beta, we have 40,000 GCP items under one folder.

I tested the page loading time for 1k, 5k, 10k, 20k, and 40k items. For 40k selected items, we're seeing page loads of 55 seconds.

  • 40k is about 55s
  • 20k is 12s
  • 10k is 6s
  • 5k is 3s
  • 1k is less than 2s.

That said, the DDF component appears to be converting the options provided via our schema and applies a default sort. There is also a lot of recursion happening with the selectedOptions function.

See https://github.com/data-driven-forms/react-forms/blob/master/packages/pf4-component-mapper/src/dual-list-tree-select/dual-list-tree-select.js#L10

Note that the non-tree version of dual-list has an isSortable prop, but the tree version does not. If we can omit the default sort (e.g., using isSortable={false}), we may see a significant performance increase.

Ideally, we would pre-sort server-side via the Cost Management settings API.

Schema

See https://console.stage.redhat.com/api/cost-management/v1/settings/

Metadata

Metadata

Assignees

Labels

InvestiagePossible bug with unknown causePF4PF4 pull request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions