Dash: Dropdown selector with a long list is very slow

Created on 28 Jul 2017  路  12Comments  路  Source: plotly/dash

This might be a plotly issue rather than a Dash issue, I'm not sure.

We've built some dropdown selectors that have very long lists of options (several thousand), and trying to use them is very slow. I couldn't figure out where the options are stored, but I did confirm that it's not going back to the server at least (because I can stop the server and still select a new item).

If there's a way to make the widget more responsive at the expense of memory that would be well worth it for us.

Most helpful comment

Just tried it out, very snappy. 馃憤

All 12 comments

Here's a simple example with 1000 items:

Which seems pretty fast. There might be something else that's going on here that would make it slow. Could you share a simple but slow example?

"Very slow" might have been a slight exaggeration, but I am impatient (and the users are more impatient). With ~23000 items there's a couple second delay between clicking and getting a list, and there's also a delay between typing and getting any feedback:

dash

Ah yeah, different story with 23,000 items. That _is_ slow! It looks like we could maybe swap out the dropdown with https://github.com/bvaughn/react-virtualized-select/ to make it faster....

Just tried out react-virtualized-select on 10k points and it froze 馃槙

woohoo! now that's what i'm talking about:
fast

OK, published it to a pre-release channel. @jamestwebber - could you try it out?

pip install dash-core-components==0.10.0rc1

It works pretty well for 50k options, but starts to bog down at 100k options

That sounds like it'll be plenty fast for us, I will give it a shot soon. Thanks for the super fast response!

Just tried it out, very snappy. 馃憤

Now part of dash-core-components==0.11.0 馃嵒

@chriddyp I have tried using the dropdown in the official example here: https://dash.plotly.com/dash-core-components/dropdown with some thousands of points and the page is very slow at loading (seconds). Is your solution using a different Dash widget?

Was this page helpful?
0 / 5 - 0 ratings