mui / mui/material-ui

[autocomplete] slow with huge number of items (1mio)

Open
#33,487 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance ready to take scope: autocomplete
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Current behavior 😯

We have a huge autocomplete (1mio items).

Performance is slow even though we have both used virtualization and a limit on filter options. It looks like an internal algo is going over the whole list even though only a few items are eventually going to be visible.

You can check performance on the virtualization demo changed with a larger amount of items and a limit size

https://codesandbox.io/s/virtualize-demo-material-ui-forked-ri9fo4?file=/demo.tsx

Expected behavior 🤔

Faster :-)

Steps to reproduce 🕹

No response

Context 🔦

No response

Your environment 🌎

Order ID 💳
#19458

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox virtualization demo, increase the data set to roughly one million items, and apply the stated filter limit to reproduce the slowdown. Trace which autocomplete work still processes the full list despite virtualization, then verify that the demo remains responsive while showing the same limited visible results.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.