Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown selector with a long list is very slow #103

Closed
jamestwebber opened this issue Jul 28, 2017 · 11 comments

Comments

Projects
None yet
2 participants
@jamestwebber
Copy link

commented Jul 28, 2017

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.

@chriddyp

This comment has been minimized.

Copy link
Member

commented Jul 28, 2017

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?

@jamestwebber

This comment has been minimized.

Copy link
Author

commented Jul 28, 2017

"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

@chriddyp

This comment has been minimized.

Copy link
Member

commented Jul 28, 2017

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....

@chriddyp

This comment has been minimized.

Copy link
Member

commented Jul 28, 2017

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

@chriddyp

This comment has been minimized.

Copy link
Member

commented Jul 28, 2017

@chriddyp

This comment has been minimized.

Copy link
Member

commented Jul 28, 2017

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

@chriddyp

This comment has been minimized.

Copy link
Member

commented Jul 28, 2017

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

pip install dash-core-components==0.10.0rc1
@chriddyp

This comment has been minimized.

Copy link
Member

commented Jul 28, 2017

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

@jamestwebber

This comment has been minimized.

Copy link
Author

commented Jul 28, 2017

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

@jamestwebber

This comment has been minimized.

Copy link
Author

commented Jul 28, 2017

Just tried it out, very snappy. 👍

chriddyp added a commit to plotly/dash-core-components that referenced this issue Aug 4, 2017

chriddyp added a commit to plotly/dash-core-components that referenced this issue Aug 4, 2017

chriddyp added a commit to plotly/dash-core-components that referenced this issue Aug 4, 2017

@chriddyp

This comment has been minimized.

Copy link
Member

commented Aug 4, 2017

Now part of dash-core-components==0.11.0 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.