[autocomplete] Optimize selected option lookup by anchmelev · Pull Request #47953 · mui/material-ui (original) (raw)
…ocomplete
Use a Set-based fast path when isOptionEqualToValue is the default strict equality comparator. This avoids quadratic selected-state checks in large multiple selections while preserving custom equality semantics. Also add a regression test to ensure custom isOptionEqualToValue behavior is unchanged.
changed the title
[material-ui][Autocomplete] Optimize selected option lookup in useAut… [Autocomplete] Optimize selected option lookup in useAut…
mj12albert changed the title
[Autocomplete] Optimize selected option lookup in useAut… [Autocomplete] Optimize selected option lookup
Co-authored-by: Albert Yu albert@albertyu.co Signed-off-by: an.chmelev an.chmelev@gmail.com
Signed-off-by: Albert Yu albert@albertyu.co
github-actions Bot pushed a commit that referenced this pull request
Signed-off-by: an.chmelev an.chmelev@gmail.com Signed-off-by: Albert Yu albert@albertyu.co Co-authored-by: Andrei Chmelev chmelev.andrey@rwb.ru Co-authored-by: Albert Yu albert@albertyu.co
oliviertassinari changed the title
[Autocomplete] Optimize selected option lookup [autocomplete] Optimize selected option lookup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})