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
Long list optimization #3789
Comments
看了下文章最后讲到 Reactabular,它实现的 virtualization 效果确实很好,不过表格我感觉暂时还不需要这个,因为现在是数据不多的时候也会有性能问题,而且数据多的时候还是建议分页吧。 |
原来 react-lazyload 给没在 viewport 的组件也渲染一个 div 是为了填充高度,让滚动条能正确显示,这个还是 Reactabular 和 react-virtualized 的实现比较高明。 Reactabular 是上下各渲染一个 tr,然后高度分别设成没显示的行高度之合。 react-virtualized 是在列表外面套一个 div,把高度撑起来,然后通过 |
react-virtualized 和 react-infinite 都需要给出每个 item 的高度,感觉这点是个限制。 在能确定每个 Item 的行高前提下,基于 react-infinite 包装的 table-view,效果还行。 |
别贴内网地址。。。 |
How about |
yep,both |
被这个问题折磨了很久了,昨天终于做了下支持任意高度的scroll list方案。react-list-any-height |
@wangtao0101 文档都不写个? |
@benjycui 兄弟,还没来得及写呀。 |
@benjycui 文档ok了 |
I can't read most of this thread, so apologies if this is not relevant, but I thought I'd share the approach we took with virtualized scrolling in Jaeger UI. It's not generalized, at this point, but might still be worth a gander. jaegertracing/jaeger-ui - src/components/TracePage/TraceTimelineViewer/ListView/index.js The items do not need to be fixed heights (possibly similar to react-list-any-height): src/components/TracePage/TraceTimelineViewer/ListView/index.js#L321,L373 Some notes from the PR:
Also, most excellent work on Ant Design! It's a joy to work with 👍 |
有计划在什么版本加入吗? |
now, SuperSelect move to |
Cool stuff @iblq! I made a slight modification of your demo to include a comparison to the ant select https://codesandbox.io/s/superselect-8xlwk |
https://github.com/react-component/select alpha version already implements virtual scroll. |
@megawac lmao what. Are we following the same thread? Where was anyone offering to hire you? |
Guess I'll have to wait for 4.0 ⌚️ The I wish Another option is react-virtualized-select, but there are two problems: 1) It's not Ant 😄 , 2) It's no longer maintained, so if you run into issues, 🤷♂ |
For anyone wondering, one solution to this for non-dropdown/select data is the |
new Table component also implement virtual list, see https://github.com/react-component/table/releases/tag/v7.0.0-alpha.16 |
@abenhamdine Is there any way we can use the new table component for virtualization support with existing ant design projects? |
Perhaps, but IMHO it's better to wait for antd 4.0, new table component is already integrated in 4.0 prepare branch. |
Yesterday I tried to add the alpha version but wasn't successful. Alright, then I will use the this one for now. https://github.com/wubostc/virtualized-table-for-antd It's had a bit messy doc, I also needed to fix the css a bit. |
Is there a way we can use the new select component in v3 while we wait for the v4? Or is there a third party select component that implements a virtualized list and with the same antd style? EDIT. |
any update ? |
@shivam-ahuja you can try Select component in antd 4, 4.0.0-rc1 is out. |
Has the table filtering been worked on? I'm still experiencing long load times on filtering large sets of data as seen in #11331. Filtering is pretty much unusable with a table having over 1k items. |
Long list render perfermance has been optimized in v4: #21656 |
so many bugs, do not use. |
react-window must specify row height.when row height vary, it is display in incorrect way. |
Asking again in 2022, is there any progress on this issue? It seems that TreeSelect is performant and uses virtual scrolling, whereas the Cascader (which is very similar) does not use virtual scrolling, and freezes when using many elements. This is a real shame as the Cascader is a fantastic component, however the performance issue means I can't use it. |
react-window can not use for fixed column |
https://4x.ant.design/components/table-cn/#components-table-demo-virtual-list need to check the filter、sort function. |
ref: https://blog.jscrambler.com/optimizing-react-rendering-through-virtualization/
flattenOptions.filter()
takes too long #9079The text was updated successfully, but these errors were encountered: