JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.44k stars 4.1k forks source link

Performance Issue with `react-select` Rendering Large Datasets #5841

Open tfmukles opened 6 months ago

tfmukles commented 6 months ago

Description: I am experiencing significant performance issues with react-select when rendering a large dataset. The component becomes slow and unresponsive, making it challenging to use in my application.

Steps to Reproduce:

  1. Provide a clear and concise set of steps to reproduce the performance problem.
  2. Include any relevant code snippets or a link to a minimal reproduction repository.

Expected Behavior: Describe what you expect to happen in terms of performance when using react-select with a large dataset.

vinuganesan commented 5 months ago

I'm also facing the same performance issue. @tfmukles Have you find any other solution?

Thanks!

SebastianNarvaez11 commented 5 months ago

same error

pinkpigeonltd commented 4 months ago

I am dealing with a dataset of 20k+ entries. Component is unfortunately not usable in that state.

highflying commented 4 months ago

I have the same issue, with 8291 options it is slow to filter and update the options in the dropdown menu. It looks like it isn't using a virtualised component so it is rendering all the options, which will 100% cause performance issues.

Tirzono commented 4 months ago

We recently migrated from v3 to v5 and were using windowed list (similar to react-windowed-select). We noticed a massive slowdown when we upgraded. With v3 it was usable and nearly instant, with v5 it can take a couple of seconds to open the list. I am talking about 10k entries roughly.

Codesandbox to reproduce the issue here:

https://codesandbox.io/p/sandbox/admiring-firefly-48gfl4

Codesandbox with v3 here (from #5255):

https://codesandbox.io/s/react-select-large-list-ug2f2

Note that the slowness is more apparent in older browsers. For example, in Edge version 119 it's much faster than in Edge version 103.