[SelectField][Dropdown Menu] Menu with many items performance much worse with popovers
I was using a SelectField before the changes related to popovers (release 0.14.0-rc2). The menu has about 400 items to choose from. Before, expanding and collapsing the menu was very fast (almost instant) but with the popover change it is quite slow (.5-1 second). I have verified that this performance change happened in 0.14.0-rc2 by switching back and forth between that and 0.14.0-rc1, and observe fast expand/collapse in rc1 but slow expand/collapse in rc2. Has anyone else noticed a similar performance hit? Was there any testing done with large lists of menuItems?
It's a bummer because the popover is giving us lots of nice features (such as actually being able to scroll through the menu items :) ) we were looking for but as is, we cannot use it.
@tehleach After code quality and documentation, performances are the next point I want to take care of. That's worrying. Could we have a gif of what's happening? Or do I just need to render 400 simple items?
I don't think I can give you a gif. I would assume rendering 400 simple items would do the trick, but I'm looking at the example on the docs site with 100 items and it seems quick. It might have to do with having long primaryText strings? I can do some more thorough testing in a bit.
Ok, here's a quick project I threw together.. pretty bare bones. I'm just rendering a DropDownMenu component with 400 items. It's possible I'm doing something really stupid but I am still having the same performance issue. If anyone pulls it down and runs it, let me know if you run into any issues. I'd like to look into and try to improve the performance but I'm not sure when I'll have time to.
I have same performance issue.My SelectField have about 500 items and it's very very slowly(2-3 second) when expanding and collapsing.I try to increase items number from 100 to 500 and then the SelectField's performance exponential decrease.
I had a similar experience but also have some spots in my app with several SelectFields of 10-20 items - even thought the list of items is short the performance seems to slow exponentially depending on how many total select fields are rendered on the page at any given time.
I have the same performance issue on all these elements :
- List
- SelectField
- Autocomplete
Maybe using something like https://github.com/bvaughn/react-virtualized would be the solution ?
react-virtualized author here. I think that implementing windowing by default within components that may potentially contain a lot of data (like selects) is a great idea. If you'd be interested in discussing a possible integration, @oliviertassinari, please reach out to me.
@bvaughn The Material-UI team is definitely interested in this integration. We are glad you are willing to help :+1:.
Let's talk more then. Let me know how best to do that. (Email? Hangout? Discord?)
@oliviertassinari This seems like there may be quite a bit of work/time before this is resolved. Do we need it for 0.15.0 or can we move it?
@nathanmarks That would be better to have into 0.15.0 but I don't think that this issues requires to introduce any breaking changes.
I don't have time to have a look at it. I have just removed it from the 0.15.0 milestone.
I have this performance problem with the AutoComplete with 500 records :(
Is there any workaround when its not fixed yet?
Thanx
@marcelobateira We have merged a first PR that improve the rendering by 20%. I'm pretty sure we can do much better.
same problem here with ~250 items using material-ui 0.15. any news about the fix?
Also having performance issues with dropdown
Still happy to lend a hand with react-virtualized integration if there's still interest and things have progressed far enough to work on it. (I think last time we talked there was some refactoring work in the queue that you guys wanted to do first.)
We implemented this using react-virtualized, though it's been modified for our uses without regard for back compat so it's not easy to merge back upstream. It works great! https://github.com/mitodl/micromasters/pull/568
though it's been modified for our uses
@noisecapella: "it" being react-virtualized or material-ui?
Material-UI from what I have seen.
Ah, yeah. They forked List and Menu. Should have looked before asking. Haven't had ☕ yet. 😄
If react-virtualized needed to be forked I was going to ask if I could help merge the changes back into the mainline. B'c I think getting material-ui and react-virtualized working together would be great. But since it's a fork of your guy's component... your call I guess. Still happy to help if there's anything I can help with!