Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Improve Field Picker Search Performance #535

Open
daedalus28 opened this issue Dec 31, 2021 · 0 comments
Open

Improve Field Picker Search Performance #535

daedalus28 opened this issue Dec 31, 2021 · 0 comments

Comments

@daedalus28
Copy link
Member

https://github.com/smartprocure/contexture-react/blob/53127ed0058ab4028593f2c81177ce66c39c8d49/src/greyVest/NestedPicker.js#L144

Can be changed to

let matchLabel = str => {
  let match = F.matchAllWords(str)
  return _.filter(x => match(x.label))
}

This will avoid recreating the regex on every iteration. Not sure if this is the bottleneck, but it's an easy performance win.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant