element icon indicating copy to clipboard operation
element copied to clipboard

[Feature Request] Table rendering is too slow when 1000 records (hopefully you can support scrolling according to scroll bars)

Open yangcan1930 opened this issue 8 years ago • 74 comments
trafficstars

Existing Component

Component Name

table

Description

背景:由于业务限制,用户希望直接用滚动条就能滚动所有数据。 现状:在1000条记录的情况下,表格基本卡死,操作卡顿很厉害;自己尝试通过滚动事件解决,但是由于滚动条是在表格内部,所以很难处理。 期望:可以根据总的记录条数做一下滚动加载,目前应该有不少类似的方案可以参考。 目前我们项目完全基于element UI来做的,各方面都很好用,只是目前遇到的这个问题比较严重,会影响到产品的交付。 期望能得到回复吧,谢谢。

yangcan1930 avatar Jul 26 '17 08:07 yangcan1930

Translation of this issue:

Existing Component

yes

Component Name

Table

Description

Background: because of business restrictions, users want to scroll directly to all the data directly.

Status: 1000 records in the case, the basic form death card, operation Caton very powerful; try to solve through the rolling events themselves, but because the scroll bar is in the form of internal, so it is difficult to deal with. Expectations: according to the total number of records to do rolling loading, there should be a lot of similar programs, you can refer to.

At present, our project is entirely based on element UI to do, all aspects are very easy to use, but this problem is encountered more serious, will affect the delivery of the product. Expect a response, thank you.

element-bot avatar Jul 26 '17 08:07 element-bot

select数据特别多时,切换路由特别慢

jialuchun avatar Jul 27 '17 02:07 jialuchun

me too, Did you solve it 你的解决了么

Ray-56 avatar Oct 27 '17 07:10 Ray-56

我们也是类似问题,滑动特别卡,切换路由也极慢。目前项目完全基于element UI来做的,解决方案也和楼主的期望一样。已经影响到产品的交付。

甚至因为这个,不得不在其他框架如iView啥的做对比研究。真心期望可以尽快解决,我们也升级到elementui 最新的2.0.8版本了。

xeoshow avatar Dec 22 '17 04:12 xeoshow

以前记得有virtual scrolling技术,可以大大加强巨大数据量下的表格性能,比如slickgrid之类: https://github.com/mleibman/SlickGrid

这是slickgrid在极大数据量下的表现: This page demonstrates various techniques for optimizing DataView performance for large client-side datasets. This page displays an interactive grid with 500'000 rows with real-time filtering. https://6pac.github.io/SlickGrid/examples/example-optimizing-dataview.html

如果elementui可以把这个技术吸纳融合进来,就完美了!

xeoshow avatar Dec 22 '17 04:12 xeoshow

我也遇上这方面问题,项目基于elementUI,但table在处理大量数据时滑动卡顿

fengyuyizai avatar Dec 27 '17 05:12 fengyuyizai

table数据量大,渲染的慢

zhaoshaomeng avatar Dec 27 '17 11:12 zhaoshaomeng

同样的问题

lu0371 avatar Jan 04 '18 06:01 lu0371

I have met this problem too.

dumbdonkey avatar Jan 08 '18 05:01 dumbdonkey

同样的问题

KristenXu avatar Jan 11 '18 02:01 KristenXu

2.0 版本解决了这个问题么?

Ray-56 avatar Jan 11 '18 02:01 Ray-56

I'm also having a problem with table performance, I have a page with about 5 tables (though not with a huge amount of data in each table), the time it takes on slower devices like tablets is unbearable.

I wish I could just have a loader inside the table so that the user knew something was happening, instead the whole page freezes while it tries to render all of them.

DomenicRoti avatar Jan 25 '18 00:01 DomenicRoti

I see the problem is still not solved since last summer?

mclaran avatar Mar 05 '18 12:03 mclaran

It is a problem, the table is generally not very perfomat. My band aid was to add a loader to the page, and a settimeout then add in the tables. It's not great, but I imagine in the future I'll have to just ditch the tables and write my own component when I get the time.

DomenicRoti avatar Mar 05 '18 17:03 DomenicRoti

there are several solutions, such as "vue-virtual-scroll-list". Why not make the component "el-table" according to a similar principle? After all, it does not load.

mclaran avatar Mar 05 '18 17:03 mclaran

I have experienced no problem with scrolling, I have seen serious lag though on older/slower devices (including mobile/tablets) in just loading a page with multiple tables on it. Once it loads, I have no issue, but the whole page freezes up as the component (presumably) figures out what to render.

DomenicRoti avatar Mar 05 '18 17:03 DomenicRoti

Due to the growth of the project, and based on customer feedback, it was decided to move from a page to an endless download. We have a very complex table. Scrolling was very slow when the number of rows was 200. And the number of such lines can reach up to 5000 and even 10000. Measurement in devTools showed that the critical problems are associated with "el-table", too much time is spent on the recalculation of the lines (reached the wait up to 5 seconds). That's a lot. Therefore, the only way out was to use virtualization and remove elements from the DOM out of sight. The result on the face: the maximum wait was 3 ms.

mclaran avatar Mar 05 '18 17:03 mclaran

只要列多,200行都会很卡顿

ruiyong-lee avatar Mar 28 '18 07:03 ruiyong-lee

Any solutions for this?

348251248 avatar Mar 28 '18 21:03 348251248

使用transform: translateZ(0);可以解决滚动卡的问题,但是如果列表多了,多选框选中反应依旧很慢 而且开启左右列固定的话,就相当于渲染了3个表格,bodyWrapper使用transform: translateZ(0);是没什么问题,但是fixedBodyWrapperrightFixedBodyWrapper的scrollTop是在bodyWrapper的滚动事件中去设置的,这里我暂时想不到用什么方法优化 image

ruiyong-lee avatar Mar 31 '18 03:03 ruiyong-lee

checkbox checking in table is also very slow when there is more than 100 rows, its possible to do something with that?

patie avatar May 28 '18 09:05 patie

题主解决了吗?

wangshuai0 avatar Jul 19 '18 12:07 wangshuai0

@xeoshow 受这位兄台的启示,特意尝试了slickgrid,完美的解决了大批量数据的问题。顺便总结了slickgrid的基本用法

1008611 avatar Sep 14 '18 00:09 1008611

@1008611 能贴下结合element ui库的例子吗?

fengyun2 avatar Oct 20 '18 13:10 fengyun2

同样问题

3lang3 avatar Nov 08 '18 07:11 3lang3

没法解决么?

iluozhiqiang avatar Nov 14 '18 12:11 iluozhiqiang

遇到类似的问题,请问您解决了吗

dasnnj avatar Nov 21 '18 09:11 dasnnj

did anyone find any solutions for this?

gorvitovskaya avatar Nov 23 '18 13:11 gorvitovskaya

以前记得有virtual scrolling技术,可以大大加强巨大数据量下的表格性能,比如slickgrid之类: https://github.com/mleibman/SlickGrid

这是slickgrid在极大数据量下的表现: This page demonstrates various techniques for optimizing DataView performance for large client-side datasets. This page displays an interactive grid with 500'000 rows with real-time filtering. https://6pac.github.io/SlickGrid/examples/example-optimizing-dataview.html

如果elementui可以把这个技术吸纳融合进来,就完美了!

table 的许多 bug 都是跟固定列有关。另外很多的 issue 都提到了 table 数据量增大造成的卡顿问题。或者按照功能,可以把 table 拆分成两类,简单的 table(保证数据量大时也不会卡顿)与带有固定列的 table。slickgrid 值得研究一下。

ziyoung avatar Nov 28 '18 03:11 ziyoung

这个场景我也碰到了。业务需要展示大量的数据。目前iview那边有一个vue-bigdata-table的组件,但一直没人更新了。功能也不太完整。数据结构采用的二维数组。也和平时用到的业务场景不一样。所以还是希望elementui能出这样一个组件。感谢了!

mythbobo avatar Dec 17 '18 07:12 mythbobo